| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
By unescaping backslash escapes in a treeprocessor, the text is properly
escaped during serialization. Fixes #1131.
As it is recognized that various third-party extensions may be calling the
old class at `postprocessors.UnescapePostprocessor` the old class remains
in the codebase, but has been deprecated and will be removed in a future
release. The new class `treeprocessors.UnescapeTreeprocessor` should be
used instead.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The HTML parser has been completely replaced. The new HTML parser is built on Python's html.parser.HTMLParser, which alleviates various bugs and simplifies maintenance of the code.
The md_in_html extension has been rebuilt on the new HTML Parser, which drastically simplifies it. Note that raw HTML elements with a markdown attribute defined are now converted to ElementTree Elements and are rendered by the serializer. Various bugs have been fixed.
Link reference parsing, abbreviation reference parsing and footnote reference parsing has all been moved from preprocessors to blockprocessors, which allows them to be nested within other block level elements. Specifically, this change was necessary to maintain the current behavior in the rebuilt md_in_html extension. A few random edge-case bugs (see the included tests) were resolved in the process.
Closes #595, closes #780, closes #830 and closes #1012.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All file-based tests are now defined as unittest test cases via a
metaclass which walks a directory and builds a unittest for each pair
of test files.
To run the tests just run `python -m unittest discover tests`. Or use
tox as the tox config has been updated to run the new tests and all nose
specific code has been removed.
The test generator tools have been removed as well. If any changes or
additions need to be made to tests, they should be implemented using
the new framework rather than with the file-based tests. Eventually,
only the PHP and pl tests should remain as file-based tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation was wrong as it also percent encoded query strings
(which should be plus encoded) and calling urllib.quote on the path (and
urllib.quote_plus on the query string) assumes the url is not already encoded.
What if the document author pasted a url that was already encoded? She probably
did not intend for `%20` to become `%2520`. Or did she? It is now clear to me
why many implementation do nothing to urls. Just pass them though as-is. To bad
if they are not valid HTML. HTML authors have to encodee their own urls, so I
guess markdown authors have to as well.
|
| |
|
|
|
|
|
| |
Also refactored the reference preprocessor to make this a little easier to
implement. Regex does more now.
|
|
|
|
|
| |
Markdown markup inside angle bracktes now gets rendered properly
in all cases except when safe_mode='escape'. Also added tests.
|
|
|
|
| |
it even though it is not documented.
|
|
|
|
| |
chars (the set defined by JG in the syntax rules). All other backslashes are passed through unaltered by the parser. If extensions want to add to the escapable chars, they can append to the list at markdown.ESCAPED_CHARS.
|
|
|
|
| |
links; i.e., [this works]. Associated with and noted as missing when debuging Ticket 79.
|
|
|
|
| |
This matches the most recent version of markdown.pl among other implementations and allows links to work after editors do autolinebreak stuff to text.
|
| |
|
|
|
|
| |
in everyones site-packages. We just need to distrubute them in the tarball for people to run before installing etc.
|
| |
|
|
|