mirror of
https://github.com/venthur/blag.git
synced 2025-11-25 12:42:41 +00:00
Added footnotes
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
* Added Python 3.14 compatibility
|
||||
* Removed requirements.txt and requirements-dev.txt
|
||||
* Added footnotes extension for markdown
|
||||
|
||||
## [2.3.3] -- 2025-04-27
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ blag is named after [the blag of the webcomic xkcd][blagxkcd].
|
||||
* Theming support using [Jinja2][] templates
|
||||
* Generation of Atom feeds for blog content
|
||||
* Fenced code blocks and syntax highlighting using [Pygments][]
|
||||
* Markdown footnotes
|
||||
* Integrated devserver
|
||||
* Available on [PyPI][]
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ def markdown_factory() -> Markdown:
|
||||
"fenced_code",
|
||||
"codehilite",
|
||||
"smarty",
|
||||
"footnotes",
|
||||
MarkdownLinkExtension(),
|
||||
],
|
||||
output_format="html",
|
||||
|
||||
@@ -151,3 +151,10 @@ header h2 {
|
||||
display: inline;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
border-top: 1px solid var(--foreground-dim);
|
||||
opacity: 0.3;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
|
||||
@@ -111,3 +111,17 @@ this --- is -- a test ...
|
||||
assert "mdash" not in html
|
||||
assert "ndash" not in html
|
||||
assert "hellip" not in html
|
||||
|
||||
|
||||
def test_footnotes() -> None:
|
||||
"""Test footnote extension."""
|
||||
md = markdown_factory()
|
||||
md1 = """
|
||||
this is a footnote[^1]
|
||||
|
||||
[^1]: this is the footnotetext
|
||||
"""
|
||||
html, meta = convert_markdown(md, md1)
|
||||
assert "<hr>" in html
|
||||
assert "<ol>" in html
|
||||
assert "footnotetext" in html
|
||||
|
||||
Reference in New Issue
Block a user