Yvee1/hascard

Add option to detect two newlines and split into question and answer

Opened this issue · 2 comments

I would like to use a Markdown file for multiple uses by multiple programs, so there has to be other contents on it. I can't make each “#” the beginning of a question, so on the base of #22, I think it could work if the question and the answer are divided by two newlines in the flashcard area.

Yvee1 commented

What other uses do you have in mind for the Markdown file? I based the syntax of the cards on Markdown syntax, but focused on making questions and answers easy to read and write, rather than it rendering nicely as a Markdown file. For example a multiple answer question is written as:

# Multiple answer question
[*] Option 1 (this is a correct answer)
[ ] Option 2
[*] Option 3 (this is a correct answer)
[ ] Option 4

But it does not look nice when rendered in Markdown (see below). I don't think this can be solved easily, so if you intend to render the file I think you should look for a different solution. Maybe a script that transforms (parts of) a real Markdown file into cards and vice versa?

Multiple answer question

[] Option 1 (this is a correct answer)
[ ] Option 2
[
] Option 3 (this is a correct answer)
[ ] Option 4

EDIT: I guess x can be used instead of * to make it a bit better:

Multiple answer question

[x] Option 1 (this is a correct answer)
[ ] Option 2
[x] Option 3 (this is a correct answer)
[ ] Option 4

but e.g.

# Order the letters in alphabetical order
4. u
1. l
2. p
3. s

gets rendered, weirdly, as:

Order the letters in alphabetical order

  1. u
  2. l
  3. p
  4. s

I use Markmap, markdown-anki-decks, Foam mainly. They all take # as something not to be omitted. So I think instead of

# Question
Choices

I need

---
Question

Choices
---

Or something else customisable that avoids #, like

Question
: Choices