Skip to content

Commit

Permalink
fix: do not escape html (#664)
Browse files Browse the repository at this point in the history
- update anki_prompt_qa.py
- test: update test_anki_prompt_qa.ambr
  • Loading branch information
MartinBernstorff authored May 6, 2024
2 parents 94c4d3c + b08f56a commit dcf5b28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
'<p>Q. This is a <em>question</em>?</p>',
'<p>FakeAnswer</p>',
'''
&lt;a href=&quot;FakeEditURL&quot; style=&quot;background-color: #5f0069;
<a href="FakeEditURL" style="background-color: #5f0069;
border: none;
color: white;
padding: 0.8em;
text-align: center;
text-decoration: none;
font-size: 0.8em;
font-family: &#x27;Inter&#x27;, sans-serif;
font-family: 'Inter', sans-serif;
float: right;
border-radius: 8px;
opacity: 0.8;
&quot;&gt;Obsidian&lt;/a&gt;
">Obsidian</a>
''',
'0',
])
Expand Down
3 changes: 1 addition & 2 deletions memium/destination/ankiconnect/anki_prompt_qa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import html
from collections.abc import Sequence
from dataclasses import dataclass

Expand Down Expand Up @@ -83,7 +82,7 @@ def to_genanki_note(self) -> genanki.Note:
fields=[
self._field_to_markdown(self.question),
self._field_to_markdown(self.answer),
html.escape(self._extra_field_content),
self._extra_field_content,
str(self.uuid),
],
tags=self.tags,
Expand Down

0 comments on commit dcf5b28

Please sign in to comment.