mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
0d47072f4c
commit
30d4453a7b
@ -272,7 +272,6 @@ def create_formats(highlighter):
|
||||
'class_selector': theme['Special'],
|
||||
'pseudo_selector': theme['Special'],
|
||||
'tag': theme['Identifier'],
|
||||
'link': theme['Link'],
|
||||
}
|
||||
for name, msg in {
|
||||
'unknown-normal': _('Invalid text'),
|
||||
@ -280,6 +279,7 @@ def create_formats(highlighter):
|
||||
}.iteritems():
|
||||
f = formats[name] = syntax_text_char_format(formats['error'])
|
||||
f.setToolTip(msg)
|
||||
formats['link'] = syntax_text_char_format(theme['Link'])
|
||||
formats['link'].setToolTip(_('Hold down the Ctrl key and click to open this link'))
|
||||
formats['link'].setProperty(LINK_PROPERTY, True)
|
||||
return formats
|
||||
|
@ -508,7 +508,6 @@ def create_formats(highlighter, add_css=True):
|
||||
'preproc': t['PreProc'],
|
||||
'nbsp': t['SpecialCharacter'],
|
||||
'spell': t['SpellError'],
|
||||
'link': t['Link'],
|
||||
}
|
||||
for name, msg in {
|
||||
'<': _('An unescaped < is not allowed. Replace it with <'),
|
||||
@ -527,6 +526,7 @@ def create_formats(highlighter, add_css=True):
|
||||
if add_css:
|
||||
formats['css_sub_formats'] = create_css_formats(highlighter)
|
||||
formats['spell'].setProperty(SPELL_PROPERTY, True)
|
||||
formats['link'] = syntax_text_char_format(t['Link'])
|
||||
formats['link'].setProperty(LINK_PROPERTY, True)
|
||||
formats['link'].setToolTip(_('Hold down the Ctrl key and click to open this link'))
|
||||
return formats
|
||||
|
Loading…
x
Reference in New Issue
Block a user