mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
67a168edae
commit
2dff34fab4
@ -32,10 +32,10 @@ PARAGRAPH_SEPARATOR = '\u2029'
|
||||
|
||||
def get_highlighter(syntax):
|
||||
try:
|
||||
ans = importlib.import_module('calibre.gui2.tweak_book.editor.syntax.' + syntax).Highlighter
|
||||
return importlib.import_module('calibre.gui2.tweak_book.editor.syntax.' + syntax).Highlighter
|
||||
except (ImportError, AttributeError):
|
||||
ans = SyntaxHighlighter
|
||||
return ans
|
||||
pass
|
||||
return SyntaxHighlighter
|
||||
|
||||
def get_smarts(syntax):
|
||||
smartsname = {'xml':'html'}.get(syntax, syntax)
|
||||
|
Loading…
x
Reference in New Issue
Block a user