summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
...
* Use simplified regex for html placeholders (#1086)Waylan Limberg2020-12-081-0/+1
| | | Co-authored-by: Reilly Raab <raabrp@gmail.com>
* Properly parse unclosed tags in code spansWaylan Limberg2020-11-231-0/+1
| | | | | | | * fix unclosed pi in code span * fix unclosed dec in code span * fix unclosed tag in code span Closes #1066.
* Properly parse processing instructions in md_in_htmlWaylan Limberg2020-11-191-0/+1
| | | | | | | 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.
* Properly parse code spans in md_in_html (#1069)Waylan Limberg2020-11-181-0/+4
| | | | | | | | | | 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.
* Bump version to 3.3.33.3.3Waylan Limberg2020-10-251-1/+1
|
* Fix issues related to hr tagsIsaac Muse2020-10-241-0/+1
| | | | | | | | | | | 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.
* Avoid catastrophic backtracking in `hr` regexWaylan Limberg2020-10-241-0/+1
| | | | Fixes #1055.
* Ensure when tag text is None that it is converted to empty stringIsaac Muse2020-10-211-0/+1
| | | Fixes #1049
* Unify all block-level tags. (#1048)Waylan Limberg2020-10-202-4/+8
| | | | | | 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.
* Bump version to 3.3.23.3.2Waylan Limberg2020-10-191-0/+5
|
* Bump version to 3.3.13.3.1Waylan Limberg2020-10-122-4/+4
|
* Correctly parse raw `script` and `style` tags. (#1038)Waylan Limberg2020-10-121-0/+1
| | | | | | | * Ensure unclosed script tags are parsed correctly by providing a workaround for https://bugs.python.org/issue41989. * Avoid cdata_mode outside of HTML blocks, such as in inline code spans. Fixes #1036.
* Ensure consistent handling of classes by fenced_code and codehilite (#1033)Waylan Limberg2020-10-082-2/+6
| | | | | | | * All non-language classes should always be assigned to the pre tag. * The language identifying class should never be included with the general list of classes. Fixes #1032
* Bump version to 3.3.3.3Waylan Limberg2020-10-061-1/+1
|
* Add PY39 support and drop PY35 (#1026)Waylan Limberg2020-10-061-2/+3
| | | | Python 3.5 reached end-of-life on 2020-09-12 and Python 3.9 was released on 2020-10-05.
* Support unicode ids in toc (#970)Antoine2020-10-012-0/+10
| | | A second function, `slugify_unicode` was added rather than changing the existing function so as to maintain backward compatibility. While an `encoding` parameter was added to the `slugify` function, we can't expect existing third party functions to accept a third parameter. Therefore, the two parameter API was preserved with this change.
* Refactor HTML Parser (#803)Waylan Limberg2020-09-222-75/+202
| | | | | | | | | | 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.
* Document passing configuration options to Extra.Waylan Limberg2020-09-172-7/+32
| | | | Closes #1019.
* Update information about richleland/pygments-css.Waylan Limberg2020-09-101-6/+7
| | | | As of richleland/pygments-css@146834e1 the css class was set to `.highlight`. Closes #1020.
* Fix complex scenarios with definition, ordered, and unordered lists (#1007)Isaac Muse2020-07-271-1/+2
| | | Fixes #918.
* Fix complex scenarios with lists and admonitions (#1006)Isaac Muse2020-07-261-0/+1
| | | | | Add better logic to admonitions to account for more complex list cases Fixes #1004
* Fix HR which follows strong em.Waylan Limberg2020-07-011-0/+1
| | | | Fixes #897.
* Support short reference image links.Waylan Limberg2020-07-011-0/+1
| | | | Fixes #894.
* Add suport for attr_lists in table headers.Waylan Limberg2020-06-302-0/+5
|
* Tune attr list regexWaylan Limberg2020-06-303-2/+56
| | | | | | | | | | | Ignore empty braces. Braces must contain at least one non-whitepsace character to be recognized as an attr list. Attr lists for table cells must be at the end of the cell content and must be seperated from the content by at least one space. This appears to be a breaking change. However, it is consistent with the behavior elsewhere. Fixes #898.
* Fix unescaping of HTML characters <> in CodeHilite. (#990)Rohitt Vashishtha2020-06-291-0/+1
| | | | | | | | | | | Previously, we'd unescape both `&amp;gt;` and `&gt;` to the same string because we were running the &amp; => & replacement first. By changing the order of this replacement, we now convert: `&amp;gt; &gt;` => `&gt; >` as expected. Fixes #988.
* Limit depth of blockquotes using Python's recursion limit. (#991)Waylan Limberg2020-06-291-0/+1
| | | | | | | | | | | | | | | | | If the Python stack comes within 100 frames of the recursion limit, then the nesting limit of blockquotes is met. Any remaining text, including angle brackets, are simply wrapped in a paragraph. To increasing the nesting depth, increase Python's recursion limit. However, be aware that each level of recursion will likely result in multiple frames being added to the Python stack. Therefore, the recursion depth and nesting depth are not one-to-one. Performance is an concern here. However, the current solution seems like a reasonable compromise. It doesn't slow things down too much, but also avoids Markdown input resulting in an error. This is mostly only a concern with contrived input anyway. For the average Markdown document, this will likely never be an issue. Fixes #799.
* Clarify attr_list docsWaylan Limberg2020-06-251-2/+32
| | | | | Document the behavior of single terms and clarify other behaviors. Addresses #964.
* Refactor fenced_code & codehilite options (#816)Waylan Limberg2020-06-234-81/+281
| | | | | | | | | | | | | | | | | | | | * Add `language-` prefix to output when syntax highlighting is disabled for both codehilite and fenced_code extensions. * Add `lang_prefix` config option to customize the prefix. * Add a 'pygments' env to tox which runs the tests with Pygments installed. Pygments is locked to a specific version in the env. * Updated codehilite to accept any Pygments options. * Refactor fenced code attributes. - ID attr is defined on `pre` tag. - Add support for attr_list extension, which allows setting arbitrary attributes. - When syntax highlighting is enabled, any pygments options can be defined per block in the attr list. - For backward compatibility, continue to support `hi_lines` outside of an attr_list. That is the only attr other than lang which is allowed without the brackets (`{}`) of an attr list. Note that if the brackets exist, then everything, including lang and hl_lines, must be within them. * Resolves #775. Resolves #334. Addresses #652.
* Fix issues with complex emphasisfacelessuser2020-06-221-0/+16
| | | | | Resolves issue that can occur with complex emphasis combinations. Fixes #979
* Add deploy workflow (#971)Waylan Limberg2020-05-211-10/+15
|
* Document limitations if attr_list extension.Waylan Limberg2020-05-142-0/+33
| | | | Closes #965.
* Bump version to 3.2.23.2.2Waylan Limberg2020-05-081-1/+1
|
* Documentation cleanup.Waylan Limberg2020-05-084-20/+19
|
* Add checklinks tox env and shell script. (#955)Waylan Limberg2020-05-078-10/+12
| | | Also clean up dead links.
* Refactor Extension API docs (#946)Charles Merriam2020-05-073-494/+548
| | | | | * Move Patterns sections. Fixes #729. * Rewrite tree processor docs. Fixes #949.
* Avoid importing packaging or pkg_resources for version validation (#948)Ran Benita2020-04-271-0/+2
| | | | | | | | | | | | | | Importing the `pkg_resources` module has high memory and startup time cost. A recent change in 102e01c already avoided it for loading extensions, but it's still used for validating that __version__ is correctly formatted. It is possible to avoid it by installing the `packaging` package, but that adds a dependency for something quite trivial. Instead, remove the validation and add tests which check the output is as expected. Since `setuptools` is no longer required at runtime, remove it from `install_required`.
* Correctly report if an extension raises a `TypeError`.Charles Merriam2020-04-191-1/+4
| | | Also Raise a `KeyError` when attempting to delete a nonexistent key from the extension registry.
* Load entry_points once using importlib.metadata.Waylan Limberg2020-04-181-0/+1
| | | | This should be more performant. Fixes #942.
* TOC fix for AtomicString handling (#934)Isaac Muse2020-04-061-1/+5
| | | Fixes #931.
* Revert: Use simplified regex for html placeholdersfacelessuser2020-04-051-2/+1
| | | | | Not sure how tests didn't get run on this, but it was completely breaking all tests. This reverts the change.
* Use simplified regex for html placeholdersReilly Raab2020-03-301-1/+2
| | | | `util` already provides the regex we need for all placeholders, and we're doing extra work parsing for the explicit union of all of them. In documents with ~30000 placeholders, I get a ~5x speedup with this change.
* Bump version to 3.2.13.2.1Waylan Limberg2020-02-121-1/+1
|
* Fix escaping of HTML special chars (<, >, &) in `.toc_tokens`Jim Porter2020-02-121-1/+4
| | | | Fixes #906.
* Bump version to 3.2.1.dev0.Waylan Limberg2020-02-081-0/+2
|
* Bump version to 3.2.0.3.2Waylan Limberg2020-02-062-9/+12
|
* Link test tools and development env documentation.Waylan Limberg2020-02-062-7/+14
| | | Resolves #892.
* Simplify xml.etree.ElementTree loading (#902)Dmitry Shachnev2020-02-032-16/+20
| | | | | | | | 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.
* Add permalink_title option (#886)Waylan Limberg2019-11-262-6/+17
| | | | | Addes a new `permalink_title` option to the TOC extension, which allows the title attribute of a permalink to be set to something other than the default English string "Permanent link". Fixes #781.
* Add anchorlink_class and permalink_class options to TOCWaylan Limberg2019-11-262-0/+12
| | | | | | | | | Two new configuration options have been added to the toc extension: `anchorlink_class` and `permalink_class` which allows class(es) to be assigned to the `anchorlink` and `permalink` HTML respectively. This allows using icon fonts from CSS for the links. Therefore, an empty string passed to `permalink` now generates an empty `permalink`. Previously no `permalink` would have been generated. Based on #776.