FossilRepo
Add markdown footnotes, definition lists, attr_list extensions - Footnotes: [^1] references and [^1]: definitions render properly - Definition lists: term + definition blocks - Attribute lists: {#id .class} on elements - Fixes "Signing and verification of artifacts" wiki page footnotes
Commit
c36c317aeaff2c2702b8bac1c2b79ff25eb0b535d4d38c2d0cb332c8386f57ce
Parent
b139e8be7e1d8b0…
1 file changed
+1
-1
+1
-1
| --- fossil/views.py | ||
| +++ fossil/views.py | ||
| @@ -41,11 +41,11 @@ | ||
| 41 | 41 | path = "/" + base_path + path |
| 42 | 42 | return f"[{text}]({path})" |
| 43 | 43 | |
| 44 | 44 | content = re.sub(r"\[([^\]\|]+?)\s*\|\s*([^\]]+?)\]", _fossil_to_md_link, content) |
| 45 | 45 | content = re.sub(r"<verbatim>(.*?)</verbatim>", r"```\n\1\n```", content, flags=re.DOTALL) |
| 46 | - html = md.markdown(content, extensions=["fenced_code", "tables", "toc"]) | |
| 46 | + html = md.markdown(content, extensions=["fenced_code", "tables", "toc", "footnotes", "def_list", "attr_list"]) | |
| 47 | 47 | |
| 48 | 48 | # Post-process: render pikchr fenced code blocks to SVG |
| 49 | 49 | def _render_pikchr_md(m): |
| 50 | 50 | try: |
| 51 | 51 | from fossil.cli import FossilCLI |
| 52 | 52 |
| --- fossil/views.py | |
| +++ fossil/views.py | |
| @@ -41,11 +41,11 @@ | |
| 41 | path = "/" + base_path + path |
| 42 | return f"[{text}]({path})" |
| 43 | |
| 44 | content = re.sub(r"\[([^\]\|]+?)\s*\|\s*([^\]]+?)\]", _fossil_to_md_link, content) |
| 45 | content = re.sub(r"<verbatim>(.*?)</verbatim>", r"```\n\1\n```", content, flags=re.DOTALL) |
| 46 | html = md.markdown(content, extensions=["fenced_code", "tables", "toc"]) |
| 47 | |
| 48 | # Post-process: render pikchr fenced code blocks to SVG |
| 49 | def _render_pikchr_md(m): |
| 50 | try: |
| 51 | from fossil.cli import FossilCLI |
| 52 |
| --- fossil/views.py | |
| +++ fossil/views.py | |
| @@ -41,11 +41,11 @@ | |
| 41 | path = "/" + base_path + path |
| 42 | return f"[{text}]({path})" |
| 43 | |
| 44 | content = re.sub(r"\[([^\]\|]+?)\s*\|\s*([^\]]+?)\]", _fossil_to_md_link, content) |
| 45 | content = re.sub(r"<verbatim>(.*?)</verbatim>", r"```\n\1\n```", content, flags=re.DOTALL) |
| 46 | html = md.markdown(content, extensions=["fenced_code", "tables", "toc", "footnotes", "def_list", "attr_list"]) |
| 47 | |
| 48 | # Post-process: render pikchr fenced code blocks to SVG |
| 49 | def _render_pikchr_md(m): |
| 50 | try: |
| 51 | from fossil.cli import FossilCLI |
| 52 |