summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Smith <zd@zdsmith.com>2018-04-25 23:22:41 -0400
committerZach Smith <zd@zdsmith.com>2018-04-25 23:22:41 -0400
commit57d0aaa4cff222ccd20b7d6f78f96ac6bb2225c0 (patch)
tree9fecc48cd730b10866768dfb9eb220151b92d6b3
parent101b234b180a04a859ebd80db69221ace7de1021 (diff)
downloadpycco-57d0aaa4cff222ccd20b7d6f78f96ac6bb2225c0.tar.gz
Use a sensible set of markdown extensions
-rw-r--r--pycco/main.py29
1 files changed, 23 insertions, 6 deletions
diff --git a/pycco/main.py b/pycco/main.py
index 63b6e99..3e3c174 100644
--- a/pycco/main.py
+++ b/pycco/main.py
@@ -21,11 +21,24 @@ from pygments import formatters, lexers
"""
"**Pycco**" is a Python port of [Docco](http://jashkenas.github.com/docco/):
the original quick-and-dirty, hundred-line-long, literate-programming-style
-documentation generator. It produces HTML that displays your comments
-alongside your code. Comments are passed through
-[Markdown](http://daringfireball.net/projects/markdown/syntax) and
-[SmartyPants](http://daringfireball.net/projects/smartypants), while code is
-passed through [Pygments](http://pygments.org/) for syntax highlighting.
+documentation generator. It produces HTML that displays your comments alongside
+your code. Comments are passed through [Markdown][markdown] and
+[SmartyPants][smartypants][^extensions], while code is passed through
+[Pygments](http://pygments.org/) for syntax highlighting.
+
+[markdown]: http://daringfireball.net/projects/markdown/syntax
+[smartypants]: https://python-markdown.github.io/extensions/footnotes/
+
+[^extensions]: Three extensions to Markdown are available:
+
+ 1. [SmartyPants][smarty]
+ 2. [Fenced code blocks][fences]
+ 3. [Footnotes][footnotes]
+
+[smarty]: https://python-markdown.github.io/extensions/smarty/
+[fences]: https://python-markdown.github.io/extensions/fenced_code_blocks/
+[footnotes]: https://python-markdown.github.io/extensions/footnotes/
+
This page is the result of running Pycco against its own source file.
If you install Pycco, you can run it from the command-line:
@@ -284,7 +297,11 @@ def highlight(sections, language, preserve_paths=True, outdir=None):
preserve_paths=preserve_paths,
outdir=outdir
),
- extensions=['markdown.extensions.smarty']
+ extensions=[
+ 'markdown.extensions.smarty',
+ 'markdown.extensions.fenced_code',
+ 'markdown.extensions.footnotes',
+ ]
)
section["num"] = i