Markdown2

Latest version: v2.4.13

Safety actively analyzes 628918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 10

1.0.1.5

- Add ability for 'extras' to have arguments. Internally the 'extras'
attribute of the Markdown class is a dict (it was a set).
- Add "demote-headers" extra that will demote the markdown for, e.g., an h1
to h2-6 by the number of the demote-headers argument.

>>> markdown(' this would be an h1', extras={'demote-headers': 2})
u'<h3>this would be an h1</h3>\n'

This can be useful for user-supplied Markdown content for a sub-section of
a page.

1.0.1.4

- [Issue 18] Allow spaces in the URL for link definitions.
- [Issue 15] Fix some edge cases with backslash-escapes.
- Fix this error that broken command-line usage:

NameError: global name 'use_file_vars' is not defined

- Add "pyshell" extra for auto-codeblock'ing Python interactive shell
sessions even if they weren't properly indented by the tab width.

1.0.1.3

- Make the use of the `-*- markdown-extras: ... -*-` emacs-style files
variable to set "extras" **off** be default. It can be turned on via
`--use-file-vars` on the command line and `use_file_vars=True` via the
module interface.
- [Issue 3] Drop the code-color extra hack added *for* issue3 that was
causing the a unicode error with unicode in a code-colored block,
<http://code.google.com/p/python-markdown2/issues/detail?id=3#c8>

1.0.1.2

- [Issue 8] Alleviate some of the incompat of the last change by allowing (at
the Python module level) the usage of `safe_mode=True` to mean what it used
to -- i.e. "replace" safe mode.
- [Issue 8, **incompatible change**] The "-s|--safe" command line option and
the equivalent "safe_mode" option has changed semantics to be a string
instead of a boolean. Legal values of the string are "replace" (the old
behaviour: literal HTML is replaced with "[HTML_REMOVED]") and "escape"
(meta chars in literal HTML is escaped).
- [Issue 11] Process markup in footnote definition bodies.
- Add support for `-*- markdown-extras: ... -*-` emacs-style files variables
(typically in an XML comment) to set "extras" for the markdown conversion.
- [Issue 6] Fix problem with footnotes if the reference string had uppercase
letters.

1.0.1.1

- [Issue 3] Fix conversion of unicode strings.
- Make the "safe_mode" replacement test overridable via subclassing: change
`Markdown.html_removed_text`.
- [Issue 2] Fix problems with "safe_mode" removing generated HTML, instead of
just raw HTML in the text.
- Add "-s|--safe" command-line option to set "safe_mode" conversion
boolean. This option is mainly for compat with markdown.py.
- Add "link-patterns" extra: allows one to specify a list of regexes that
should be automatically made into links. For example, one can define a
mapping for things like "Mozilla Bug 1234":

regex: mozilla\s+bug\s+(\d+)
href: http://bugzilla.mozilla.org/show_bug.cgi?id=\1

See <https://github.com/trentm/python-markdown2/wiki/Extras> for details.
- Add a "MarkdownWithExtras" class that enables all extras (except
"code-friendly"):

>>> import markdown2
>>> converter = markdown2.MarkdownWithExtras()
>>> converter.convert('...TEXT...')
...HTML...

- [Issue 1] Added "code-color" extra: pygments-based (TODO: link) syntax
coloring of code blocks. Requires the pygments Python library on sys.path.
See <https://github.com/trentm/python-markdown2/wiki/Extras> for details.
- [Issue 1] Added "footnotes" extra: adds support for footnotes syntax. See
<https://github.com/trentm/python-markdown2/wiki/Extras> for details.

1.0.1.0

- Added "code-friendly" extra: disables the use of leading and trailing `_`
and `__` for emphasis and strong. These can easily get in the way when
writing docs about source code with variable_list_this and when one is not
careful about quoting.
- Full basic Markdown syntax.


(Started maintaining this log 15 Oct 2007. At that point there had been no
releases of python-markdown2.)

Page 10 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.