Commit 18165c7e authored by Denis Salem's avatar Denis Salem
Browse files

Fix CodeHighlight '::' splitting, update Academik, wip on themes unit tests

parent 0c5c0693
......@@ -22,13 +22,15 @@ blockquote p
clear: both;
font-size: 0.8em;
padding-left: 1em;}
.__VENC_PYGMENTIZE_WRAPPER__ table {width: 580px; display: block; clear: both;}
.__VENC_PYGMENTIZE_WRAPPER__ {clear: both; width: 580px;}
.__VENC_PYGMENTIZE_WRAPPER__ pre {overflow-x: auto;}
.__VENC_PYGMENTIZE_WRAPPER__ table {width: 580px; display: block; }
.__VENC_PYGMENTIZE_WRAPPER__ table tr {width: 100%; display: block;}
.__VENC_PYGMENTIZE_WRAPPER__ table tbody {width: 100%; display: block;}
.__VENC_PYGMENTIZE_WRAPPER__ table .linenos {width: 4%; display: inline-block;vertical-align: top;}
.__VENC_PYGMENTIZE_WRAPPER__ table .code {width: 95%; display: inline-block;vertical-align: top;}
.__VENC_PYGMENTIZE_WRAPPER__ table td pre {vertical-align: top; overflow: hidden; overflow-x: auto; margin: 0px;}
.__VENC_PYGMENTIZE_WRAPPER__ table td pre {vertical-align: top; overflow: hidden; margin: 0px; overflow-x: auto;}
.note, .footnote
{float: left;
......
......@@ -6,14 +6,14 @@ title: .:GetEntryTitle:.
---VENC-END-PREVIEW---
This template is designed to work with defaults themes
The following will display aside if used with Academik theme. Otherwise,
The following[¹](#footnote_1) will display aside if used with Academik theme. Otherwise,
it will be display below the current paragraphe.
.:SetStyle:: ::footnote:: A first footnote for the sake of the demonstration:.
.:SetStyle::footnote_1::footnote:: A first footnote for the sake of the demonstration:.
You can go directly to [this](#footnote_1) second footnote by clicking the link.
You can go directly to [this](#footnote_2) second footnote by clicking the link.
Do not forget to add a line break so the parser will know that the footnote
is not part of this paragraphe
.:SetStyle::footnote_1::footnote::¹ The first argument is the css id name,
.:SetStyle::footnote_2::footnote::² The first argument is the css id name,
the second is the css class name:.
......@@ -53,7 +53,7 @@ class CodeHighlight:
lexer = pygments.lexers.get_lexer_by_name(argv[0], stripall=True)
formatter = pygments.formatters.HtmlFormatter(linenos=(True if argv[1]=="True" else False), cssclass=name)
code = argv[2]
code = "::".join(argv[2:])
result = "<div class=\"__VENC_PYGMENTIZE_WRAPPER__\">"+pygments.highlight(code.replace("\:",":"), lexer, formatter).replace(".:","&period;:")+"</div>"
css = formatter.get_style_defs()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment