Skip to content

Use org-export-as with non-nil subtreep instead of manual substring - #81

Open
marzipankaiser wants to merge 1 commit into
louietan:masterfrom
marzipankaiser:master
Open

Use org-export-as with non-nil subtreep instead of manual substring#81
marzipankaiser wants to merge 1 commit into
louietan:masterfrom
marzipankaiser:master

Conversation

@marzipankaiser

Copy link
Copy Markdown

Change the code for exporting the content of a given card side.

Reasons for this change:

As far as I can tell, there is no reason to manually construct a substring here, as the current position is already at the correct node and the substring generated is for the current subtree anyway (Let me know if I am wrong with this assumption).

* Simplifies the code
* Respects global org settings, noweb references etc
* Is consistent with `anki-editor-export-subtree-to-html`,
  allowing this to be used as a "preview"
@orgtre

orgtre commented Oct 31, 2022

Copy link
Copy Markdown

This breaks the code allowing more flexible note types here and more work would be required to add this functionality into orgtre/anki-editor. E.g. if a note has no subheadings, with this code, the whole content of the next heading is included on the "Back" field of the note. Or if the "Back" field has a subheading, only the content of the subheading is included on the "Back" of the note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

anki-editor-push-notes ignores source block headers on execution

2 participants