Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Denis Salem
VenC
Commits
18165c7e
Commit
18165c7e
authored
Aug 13, 2019
by
Denis Salem
Browse files
Fix CodeHighlight '::' splitting, update Academik, wip on themes unit tests
parent
0c5c0693
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/share/themes/academik/assets/style.css
View file @
18165c7e
...
...
@@ -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
;
...
...
src/share/themes_templates/markdown_example_footnotes
View file @
18165c7e
...
...
@@ -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:.
src/venc2/patterns/code_highlight.py
View file @
18165c7e
...
...
@@ -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
(
".:"
,
".:"
)
+
"</div>"
css
=
formatter
.
get_style_defs
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment