mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Fix regression that caused crash while syntax highlighting CSS stylesheets that contain url() tokens without enclosing quotes
This commit is contained in:
parent
b2d4d55d63
commit
14431cee13
@ -217,6 +217,7 @@ def content(state, text, i, formats, user_data):
|
|||||||
m = token.match(text, i)
|
m = token.match(text, i)
|
||||||
if m is not None:
|
if m is not None:
|
||||||
if name is URL_TOKEN:
|
if name is URL_TOKEN:
|
||||||
|
h = 'link'
|
||||||
url = m.group()
|
url = m.group()
|
||||||
prefix, main, suffix = url[:4], url[4:-1], url[-1]
|
prefix, main, suffix = url[:4], url[4:-1], url[-1]
|
||||||
if len(main) > 1 and main[0] in ('"', "'") and main[0] == main[-1]:
|
if len(main) > 1 and main[0] in ('"', "'") and main[0] == main[-1]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user