From 6509d584205399248e276eefc12532f086635926 Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Thu, 27 Apr 2023 14:25:10 +0200 Subject: [PATCH] fix HeaderLine to match with Markdown result --- src/calibre/gui2/markdown_syntax_highlighter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/markdown_syntax_highlighter.py b/src/calibre/gui2/markdown_syntax_highlighter.py index 755d69772a..094e09f62e 100644 --- a/src/calibre/gui2/markdown_syntax_highlighter.py +++ b/src/calibre/gui2/markdown_syntax_highlighter.py @@ -29,7 +29,7 @@ class MarkdownHighlighter(QSyntaxHighlighter): 'BlockQuote': re.compile(r'(?u)^\s*>+\s*'), 'BlockQuoteCount': re.compile('^[ \t]*>[ \t]?'), 'CodeSpan': re.compile('(?P`+).+?(?P=delim)'), - 'HeaderLine': re.compile(r'(?u)^(\s*(-|=)\s*){3,}$'), + 'HeaderLine': re.compile(r'(?u)^(-|=)+\s*$'), 'HR': re.compile(r'(?u)^(\s*(\*|-|_)\s*){3,}$'), 'Html': re.compile('<.+?>') }