Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ abstract class AbstractNote {
}
if (context) {
const context_field = data.context_fields[this.note_type]
template["fields"][context_field] += context
template["fields"][context_field] += '<br>' + context
}
if (data.add_obs_tags) {
for (let key in template["fields"]) {
Expand Down Expand Up @@ -297,7 +297,7 @@ export class RegexNote {
}
if (context) {
const context_field = data.context_fields[this.note_type]
template["fields"][context_field] += context
template["fields"][context_field] += '<br>' + context
}
if (this.note_type.includes("Cloze") && !(note_has_clozes(template))) {
this.identifier = CLOZE_ERROR //An error code that says "don't add this note!"
Expand Down
2 changes: 1 addition & 1 deletion tests/anki/test_context_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ def test_cards_front_back_tag_type(col: Collection):

note1 = col.get_note(anki_IDs[0])
assert note1.fields[0] == "This is a test"
assert note1.fields[1] == "Test successful!context_test/context_test.md > Overall point > Subheading 2"
assert note1.fields[1] == "Test successful!<br>context_test/context_test.md > Overall point > Subheading 2"

assert note1.note_type()["name"] == "Basic"