File: markdown2.1

package info (click to toggle)
python-markdown2 2.3.7-2%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,952 kB
  • sloc: python: 2,790; makefile: 35
file content (139 lines) | stat: -rw-r--r-- 4,618 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.8.
.TH MARKDOWN2 "1" "December 2018" "markdown2 2.3.7" "User Commands"
.SH NAME
markdown2 \- Command to convert a markdown file to HTML
.SH SYNOPSIS
.B markdown2
[\fI\,PATHS\/\fR...]
.SH DESCRIPTION
A fast and complete Python implementation of Markdown, a
text\-to\-HTML conversion tool for web writers.
.PP
Supported extra syntax options (see \fB\-x\fR|\-\-extras option below and
see <https://github.com/trentm/python\-markdown2/wiki/Extras> for details):
.PP
* code\-friendly: Disable _ and __ for em and strong.
* cuddled\-lists: Allow lists to be cuddled to the preceding paragraph.
* fenced\-code\-blocks: Allows a code block to not have to be indented
.IP
by fencing it with '```' on a line before and after. Based on
<http://github.github.com/github\-flavored\-markdown/> with support for
syntax highlighting.
.PP
* footnotes: Support footnotes as in use on daringfireball.net and
.IP
implemented in other Markdown processors (tho not in Markdown.pl v1.0.1).
.PP
* header\-ids: Adds "id" attributes to headers. The id value is a slug of
.IP
the header text.
.PP
* highlightjs\-lang: Allows specifying the language which used for syntax
.IP
highlighting when using fenced\-code\-blocks and highlightjs.
.PP
* html\-classes: Takes a dict mapping html tag names (lowercase) to a
.IP
string to use for a "class" tag attribute. Currently only supports "img",
"table", "pre" and "code" tags. Add an issue if you require this for other
tags.
.PP
* link\-patterns: Auto\-link given regex patterns in text (e.g. bug number
.IP
references, revision number references).
.PP
* markdown\-in\-html: Allow the use of `markdown="1"` in a block HTML tag to
.IP
have markdown processing be done on its contents. Similar to
<http://michelf.com/projects/php\-markdown/extra/#markdown\-attr> but with
some limitations.
.PP
* metadata: Extract metadata from a leading '\-\-\-'\-fenced block.
.IP
See <https://github.com/trentm/python\-markdown2/issues/77> for details.
.PP
* nofollow: Add `rel="nofollow"` to add `<a>` tags with an href. See
.IP
<http://en.wikipedia.org/wiki/Nofollow>.
.PP
* numbering: Support of generic counters.  Non standard extension to
.IP
allow sequential numbering of figures, tables, equations, exhibits etc.
.PP
* pyshell: Treats unindented Python interactive shell sessions as <code>
.IP
blocks.
.PP
* smarty\-pants: Replaces ' and " with curly quotation marks or curly
.TP
apostrophes.
Replaces \fB\-\-\fR, \fB\-\-\-\fR, ..., and . . . with en dashes, em dashes,
.IP
and ellipses.
.PP
* spoiler: A special kind of blockquote commonly hidden behind a
.IP
click on SO. Syntax per <http://meta.stackexchange.com/a/72878>.
.PP
* strike: text inside of double tilde is ~~strikethrough~~
* tag\-friendly: Requires atx style headers to have a space between the # and
.IP
the header text. Useful for applications that require twitter style tags to
pass through the parser.
.PP
* tables: Tables using the same format as GFM
.IP
<https://help.github.com/articles/github\-flavored\-markdown#tables> and
PHP\-Markdown Extra <https://michelf.ca/projects/php\-markdown/extra/#table>.
.PP
* toc: The returned HTML string gets a new "toc_html" attribute which is
.IP
a Table of Contents for the document. (experimental)
.PP
* use\-file\-vars: Look for an Emacs\-style markdown\-extras file variable to turn
.IP
on Extras.
.PP
* wiki\-tables: Google Code Wiki\-style tables. See
.IP
<http://code.google.com/p/support/wiki/WikiSyntax#Tables>.
.PP
* xml: Passes one\-liner processing instructions and namespaced XML tags.
.SH OPTIONS
.TP
\fB\-\-version\fR
show program's version number and exit
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-v\fR, \fB\-\-verbose\fR
more verbose output
.TP
\fB\-\-encoding\fR=\fI\,ENCODING\/\fR
specify encoding of text content
.TP
\fB\-\-html4tags\fR
use HTML 4 style for empty element tags
.TP
\fB\-s\fR MODE, \fB\-\-safe\fR=\fI\,MODE\/\fR
sanitize literal HTML: 'escape' escapes HTML meta
chars, 'replace' replaces with an [HTML_REMOVED] note
.TP
\fB\-x\fR EXTRAS, \fB\-\-extras\fR=\fI\,EXTRAS\/\fR
Turn on specific extra features (not part of the core
Markdown spec). See above.
.TP
\fB\-\-use\-file\-vars\fR=\fI\,USE_FILE_VARS\/\fR
Look for and use Emacs\-style 'markdown\-extras' file
var to turn on extras. See
<https://github.com/trentm/pythonmarkdown2/wiki/Extras>
.TP
\fB\-\-link\-patterns\-file\fR=\fI\,LINK_PATTERNS_FILE\/\fR
path to a link pattern file
.TP
\fB\-\-self\-test\fR
run internal self\-tests (some doctests)
.TP
\fB\-\-compare\fR
run against Markdown.pl as well (for testing)