| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
In addition to checking the spelling in our documentation, we are now also checking the spelling of the README.md and similar files as well as comments in our Python code.
|
| |
|
| |
|
|
|
|
| |
Fixes #1079.
|
|
|
|
|
|
|
| |
* fix unclosed pi in code span
* fix unclosed dec in code span
* fix unclosed tag in code span
Closes #1066.
|
|
|
|
|
|
|
| |
Empty tags do not have a `mardkown` attribute set on them. Therefore,
there is no need to check the mdstack to determine behavior. If we
are in any md_in_html state (regardless of block, span, etc) the
behavior is the same. Fixes #1070.
|
|
|
|
|
|
|
|
|
|
| |
This reverts part of 2766698 and re-implements handling
of tails in the same manner as the core.
Also, ensure line_offset doesn't raise an error on bad input
(see #1066) and properly handle script tags in code
spans (same as in the core).
Fixes #1068.
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that start/end tag handler does not include tags in the previous
paragraph.
Provide special handling for tags like hr that never have content.
Use sets for block tag lists as they are much faster when comparing
if an item is in the list.
Fixes #1053.
|
|
|
| |
Fixes #1049
|
|
|
|
|
|
| |
Use the list of tags defined in the core by the md_in_html extension.
This ensures that the lists do not diverge and allows users and/or
extensions to expand the list in the core and have that change affect
the extension. Fixes #1047.
|
|
|
| |
Fixes #1040 and fixes #1045.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By calling str on all stash elements we ensure they don't raise an error.
Worse case, soemthing like `<Element 'div' at 0x000001B2DAE94900>` gets
inserted into the output. However, with the override in the md_in_html
extension, we actually serialize and reinsert the original HTML. Worse case,
an HTML block which should be parsed as Markdown gets skipped by the
extension (`<div markdown="block"></div>` gets inserting into the output).
The tricky part is testing as there should be no known cases where this
ever occurs. Therefore, we forefully pass an etree Element directly to
the method in the test. That said, as #1040 is unresolved at this point,
I have tested locally with a real existing case and it works well.
Related to #1040.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
cElementTree is a deprecated alias for ElementTree since Python 3.3.
Also drop the recommendation to import etree from markdown.util,
and deprecate markdown.util.etree.
|
|
|
|
|
|
|
| |
* Python syntax upgraded using `pyupgrade --py3-plus`
* Travis no longer uses `sudo`. See https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
See #760 for Python Version Support Timeline and related dicussion.
|
|
Move Markdown parsing from the extra extension to a separate
extension called md_in_html.
|