From mboxrd@z Thu Jan 1 00:00:00 1970 From: andy at warmcat.com (Andy Green) Date: Wed, 20 Jun 2018 18:13:20 +0800 Subject: [PATCH v4 16/16] md2html: change css name to not conflict with highlight In-Reply-To: <152948941145.29466.10223016890282865269.stgit@mail.warmcat.com> References: <152948941145.29466.10223016890282865269.stgit@mail.warmcat.com> Message-ID: <152948960013.29466.1632273920328107539.stgit@mail.warmcat.com> md2html gets pygments to define the css for "highlight", making display of the blame view fragile against pygments version. On Fedora 28 / python3-pygments-2.2.0-10.fc28.noarch, "highlight" gets redefined so it no longer displays at the top of its parent. This patch changes the css class name used by md2html to "md2html_highlight" so there is no conflict with other definitions of "highlight". Signed-off-by: Andy Green --- filters/html-converters/md2html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/filters/html-converters/md2html b/filters/html-converters/md2html index 6f4f1b3..00cf73a 100755 --- a/filters/html-converters/md2html +++ b/filters/html-converters/md2html @@ -305,7 +305,7 @@ sys.stdout.write(''' border: none; background: transparent; } -.markdown-body .highlight pre, .markdown-body pre { +.markdown-body .md2html_highlight pre, .markdown-body pre { background-color: #f8f8f8; border: 1px solid #ccc; font-size: 13px; @@ -321,7 +321,7 @@ sys.stdout.write(''' border: none; } ''') -sys.stdout.write(HtmlFormatter(style='pastie').get_style_defs('.highlight')) +sys.stdout.write(HtmlFormatter(style='pastie').get_style_defs('.md2html_highlight')) sys.stdout.write(''' ''') @@ -334,7 +334,7 @@ extensions = [ "markdown.extensions.tables" ] extension_configs = { - "markdown.extensions.codehilite":{"css_class":"highlight"} + "markdown.extensions.codehilite":{"css_class":"md2html_highlight"} } if len(sys.argv) > 2: