Skip to content

Match org headings escaped with a , (needed within org source blocks) #100

@tommyphillips

Description

@tommyphillips

In an org file, I would like to 'hide' anki-editor code as much as possible.
My strategy for doing so is to write the anki-editor within a source block as follows:

#+begin_src org
,*  Question Name
:PROPERTIES:
:ANKI_NOTE_TYPE: Cloze
:ANKI_DECK: Programming
:ANKI_NOTE_ID: 1653402332712
:END:

,** Text

{{c1::Solution::Question}}

#+end_src

The problem is that it is necessary to escape the heading *s using ,*
Otherwise, the main org document will interpret headings within the block as part of the main document.
But anki-editor does not recognise this ,* syntax.
I have had a look at the source code, but I am no expert.
It seems that probably only a small tweak is required to enable anki-editor to recognise the ,*.

If anyone could help, I would appreciate it.
In case anyone suggests tangling the block to another file, and then pushing that file to anki, this is not the ideal solution, because the source block will not receive the ANKI_NOTE_ID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions