-
Notifications
You must be signed in to change notification settings - Fork 129
Question answer style
Rubaiyat Khondaker edited this page Dec 14, 2020
·
4 revisions
Regex line: ^Q: ((?:.+\n)*)\n*A: (.+(?:\n(?:^.{1,3}$|^.{4}(?<!<!--).*))*)
Example usage:
- Create a file called
test.md
- Paste the following contents into the file:
Q: How do you use this style? A: Just like this. Q: Can the question run over multiple lines? A: Yes, and So can the answer Q: Does the answer need to be immediately after the question? A: No, and preceding whitespace will be ignored. Q: How is this possible? A: The 'magic' of regular expressions!
- In the plugin settings, paste the Regex line into the 'Custom Regexps' field associated with 'Basic'
- Ensure that the 'Regex' option is checked
- Click the Anki icon on the ribbon to run the plugin
- Run the script, and check 'Config' to open up the config file:
- Navigate to the "Custom Regexps" section
- Change the line
Basic =
to
Basic = ^Q: ((?:.+\n)*)\n*A: (.+(?:\n(?:^.{1,3}$|^.{4}(?<!<!--).*))*)
- Save the config file
- Run the script on the file, with 'Regex' checked:
- You should see these cards in Anki: