Skip to content

Ruled style

Rubaiyat Khondaker edited this page Dec 16, 2020 · 3 revisions

Usage

Regex line: ((?:[^\n][\n]?)+\n)-{3,}((?:\n(?:^.{1,3}$|^.{4}(?<!<!--).*))*)

  1. Create a file called test.md
  2. Paste the following contents into the file:
How do you use ruled style?
---
You need at least three '-' between the front and back of the card.


Are paragraphs
supported?
---------
Yes, but you need the front and back
directly before and after the ruler.

Obsidian Plugin users

  1. In the plugin settings, paste the Regex line into the 'Custom Regexps' field associated with 'Basic'
  2. Ensure that the 'Regex' option is checked
  3. Click the Anki icon on the ribbon to run the plugin

Python Script users

  1. Run the script, and check 'Config' to open up the config file:
    GUI
  2. Navigate to the "Custom Regexps" section
  3. Change the line
Basic =  

to

Basic = ((?:[^\n][\n]?)+\n)-{3,}((?:\n(?:^.{1,3}$|^.{4}(?<!<!--).*))*)
  1. Save the config file
  2. Run the script on the file, with 'Regex' checked:
    GUI

All users

  1. You should see these cards in Anki:
    ruled_1
    ruled_2
Clone this wiki locally