Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default content to back field #75

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

leoc
Copy link

@leoc leoc commented Sep 1, 2020

This change lets the building of fields default to the back field for content that does not contain another child heading.

Regarding #61 and #59

Now we can write:

* My question for the front?
** Back
My answer at the back of the card...

as

* My question for the front?
My answer at the back of the card...

No need to specify a "Back" heading.

Maybe we can use "per-card-type" field names...

Cheers!

@leoc leoc changed the base branch from master to develop September 1, 2020 14:27
@leoc leoc force-pushed the feature-default-content-to-back-field branch from b4f27b5 to 9dcc42a Compare September 1, 2020 14:29
@gsingh93
Copy link

@louietan any chance you could merge this?

@searene
Copy link

searene commented Sep 11, 2021

Can this be merged into master? It would be really helpful.

@orgtre
Copy link

orgtre commented Oct 31, 2022

This commit in orgtre/anki-editor provides the functionality of this pull request. It also allows a more general logic:

  • If exactly one field is omitted (based on the ANKI_NOTE_TYPE), then the content between the note heading and the first subheading (or the next same-level heading) is mapped to the missing field.
  • Moreover, if exactly two fields are omitted, the note heading is mapped to the first missing field, and the second missing field is mapped as described in the previous sentence.

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.

4 participants