mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Add a note about escaping braces in the editor templates
This commit is contained in:
parent
0e40a2550e
commit
37c2044c6f
@ -538,7 +538,9 @@ class TemplatesDialog(Dialog): # {{{
|
|||||||
|
|
||||||
self.helpl = la = QLabel(_(
|
self.helpl = la = QLabel(_(
|
||||||
'The variables {0} and {1} will be replaced with the title and author of the book. {2}'
|
'The variables {0} and {1} will be replaced with the title and author of the book. {2}'
|
||||||
' is where the cursor will be positioned.').format('{TITLE}', '{AUTHOR}', '%CURSOR%'))
|
' is where the cursor will be positioned. If you want to include braces in your template,'
|
||||||
|
' for example for CSS rules, you have to escape them, like this: {3}').format(*['<code>%s</code>'%x for x in
|
||||||
|
['{TITLE}', '{AUTHOR}', '%CURSOR%', 'body {{ color: red }}']]))
|
||||||
la.setWordWrap(True)
|
la.setWordWrap(True)
|
||||||
l.addRow(la)
|
l.addRow(la)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user