mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add support for syntax highlighting box-sizing
This commit is contained in:
parent
51e94dcc65
commit
653af227c1
@ -40,8 +40,8 @@ content_tokens = [(re.compile(k), v, n) for k, v, n in [
|
||||
r'border-right-style|border-right-width|border-right|border-top-color|'
|
||||
r'border-top-style|border-top-width|border-bottom|'
|
||||
r'border-collapse|border-left|border-width|border-color|'
|
||||
r'border-spacing|border-style|border-top|border|caption-side|'
|
||||
r'clear|clip|color|content|counter-increment|counter-reset|'
|
||||
r'border-spacing|border-style|border-top|border-box|border|box-sizing|caption-side|'
|
||||
r'clear|clip|color|content-box|content|counter-increment|counter-reset|'
|
||||
r'cue-after|cue-before|cue|cursor|direction|display|'
|
||||
r'elevation|empty-cells|float|font-family|font-size|'
|
||||
r'font-size-adjust|font-stretch|font-style|font-variant|'
|
||||
@ -329,6 +329,7 @@ if __name__ == '__main__':
|
||||
/* A demonstration css sheet */
|
||||
body {
|
||||
color: green;
|
||||
box-sizing: border-box;
|
||||
font-size: 12pt
|
||||
}
|
||||
|
||||
|
@ -604,6 +604,7 @@ class Editor(QMainWindow):
|
||||
|
||||
|
||||
def launch_editor(path_to_edit, path_is_raw=False, syntax='html', callback=None):
|
||||
from calibre.gui2 import Application
|
||||
from calibre.gui2.tweak_book import dictionaries
|
||||
from calibre.gui2.tweak_book.main import option_parser
|
||||
from calibre.gui2.tweak_book.ui import Main
|
||||
@ -611,7 +612,7 @@ def launch_editor(path_to_edit, path_is_raw=False, syntax='html', callback=None)
|
||||
dictionaries.initialize()
|
||||
refresh_spell_check_status()
|
||||
opts = option_parser().parse_args([])
|
||||
app = QApplication([])
|
||||
app = Application([])
|
||||
# Create the actions that are placed into the editors toolbars
|
||||
main = Main(opts) # noqa
|
||||
if path_is_raw:
|
||||
|
Loading…
x
Reference in New Issue
Block a user