mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
quote fonts added via the Add Field dialog
This commit is contained in:
parent
1cdf0b1e9d
commit
1ae45c5445
1 changed files with 7 additions and 4 deletions
|
@ -790,10 +790,13 @@ class CardLayout(QDialog):
|
||||||
|
|
||||||
def _addField(self, field: str, font: str, size: int) -> None:
|
def _addField(self, field: str, font: str, size: int) -> None:
|
||||||
text = self.tform.edit_area.toPlainText()
|
text = self.tform.edit_area.toPlainText()
|
||||||
text += "\n<div style='font-family: %s; font-size: %spx;'>{{%s}}</div>\n" % (
|
text += (
|
||||||
font,
|
"\n<div style='font-family: \"%s\"; font-size: %spx;'>{{%s}}</div>\n"
|
||||||
size,
|
% (
|
||||||
field,
|
font,
|
||||||
|
size,
|
||||||
|
field,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
self.tform.edit_area.setPlainText(text)
|
self.tform.edit_area.setPlainText(text)
|
||||||
self.change_tracker.mark_basic()
|
self.change_tracker.mark_basic()
|
||||||
|
|
Loading…
Reference in a new issue