summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix complex scenarios with lists and admonitions (#1006)Isaac Muse2020-07-263-5/+270
| | | | | Add better logic to admonitions to account for more complex list cases Fixes #1004
* Fix HR which follows strong em.Waylan Limberg2020-07-013-1/+18
| | | | Fixes #897.
* Support short reference image links.Waylan Limberg2020-07-013-0/+36
| | | | Fixes #894.
* Add suport for attr_lists in table headers.Waylan Limberg2020-06-304-7/+20
|
* Tune attr list regexWaylan Limberg2020-06-308-34/+134
| | | | | | | | | | | 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-294-1/+28
| | | | | | | | | | | 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-295-2/+99
| | | | | | | | | | | | | | | | | 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-2318-633/+1799
| | | | | | | | | | | | | | | | | | | | * 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-225-3/+47
| | | | | Resolves issue that can occur with complex emphasis combinations. Fixes #979
* Bump version to 3.3.dev0.Waylan Limberg2020-06-171-1/+1
|
* Fix exception cause in core.pyRam Rachum2020-06-121-2/+2
|
* Allow checklinks check to fail.Waylan Limberg2020-05-221-0/+3
| | | | | | | | | | | | | | | There are too many random arbitrary failures with this check. We still want the check to run to ensure we don't introduce any new errors. However, the random errors on external URLs are frustrating, especcially when a different URL fails on each run. And then when the URL is checked manually, it is clearly good. If the tool provided a flag to limit the check to intenral URLs only (it doesn't), we wouldn't use that anyway because we do want to know when an extenral URL becomes invalid. Although, I suppose we could do two runs, one intenral and one external and only allow the external to fail. But that will have to wait until such a feature is added to the tool or we find a better tool.
* Add deploy workflow (#971)Waylan Limberg2020-05-212-10/+68
|
* Add project urlsWaylan Limberg2020-05-211-0/+5
|
* Use README.md for long_description.Waylan Limberg2020-05-181-21/+3
| | | | | | | | With `long_description_content_type="text/markdown"` it is now possible to use Markdown text in the `long_description` meta-data field. Make sure the latest tools (setuptools, wheel, twine) are installed before deploying. See https://dustingram.com/articles/2018/03/16/markdown-descriptions-on-pypi/ for details.
* Add push trigger to tox workflow. (#968)Waylan Limberg2020-05-182-4/+13
| | | | | * The build button/badge in the README now only points to push events so that an unmerged failing PR doesn't cause the build status to show as 'failing.' * Restrict node setup to checklinks env.
* Update build status buttonWaylan Limberg2020-05-171-3/+3
| | | Point to GitHub workflow action rather than Travis.
* Flake8 cleanup.Waylan Limberg2020-05-143-6/+6
| | | | | The latest version of flake8 added some new tests. This cleans up after them.
* Document limitations if attr_list extension.Waylan Limberg2020-05-142-0/+33
| | | | Closes #965.
* Fix importlib-metadata requirement name for Python < 3.8Dmitry Shachnev2020-05-111-1/+1
|
* Switch to GitHub Actions from Travis (#958)Waylan Limberg2020-05-093-47/+84
|
* Bump version to 3.2.23.2.2Waylan Limberg2020-05-082-2/+2
|
* Documentation cleanup.Waylan Limberg2020-05-085-20/+20
|
* Add checklinks tox env and shell script. (#955)Waylan Limberg2020-05-0711-11/+51
| | | Also clean up dead links.
* Refactor Extension API docs (#946)Charles Merriam2020-05-074-494/+550
| | | | | * Move Patterns sections. Fixes #729. * Rewrite tree processor docs. Fixes #949.
* Avoid importing packaging or pkg_resources for version validation (#948)Ran Benita2020-04-274-18/+38
| | | | | | | | | | | | | | 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-194-13/+19
| | | Also Raise a `KeyError` when attempting to delete a nonexistent key from the extension registry.
* Fix typo, in the ten cut and pasted versionsCharles Merriam2020-04-1916-26/+26
|
* Load entry_points once using importlib.metadata.Waylan Limberg2020-04-184-6/+12
| | | | This should be more performant. Fixes #942.
* TOC fix for AtomicString handling (#934)Isaac Muse2020-04-063-3/+42
| | | Fixes #931.
* Revert: Use simplified regex for html placeholdersfacelessuser2020-04-052-3/+2
| | | | | 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-302-2/+3
| | | | `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.
* Fixed typos in extensions/codehilite.pyGaurav Kondhare2020-03-221-10/+10
| | | | | | | | | | | | Fixed spellings : 1. shebang 2. identification Added 'the' before 'said' Fixed vertical line column size to 79 Fixed failing tests : Removed trailing spaces
* Remove universal flag from setup.cfgBen Nuttall2020-03-111-3/+0
|
* Fix simple typo: wihtout -> withoutTim Gates2020-02-211-1/+1
| | | | Closes #913
* Bump version to 3.2.13.2.1Waylan Limberg2020-02-122-2/+2
|
* Fix escaping of HTML special chars (<, >, &) in `.toc_tokens`Jim Porter2020-02-123-16/+44
| | | | Fixes #906.
* Bump version to 3.2.1.dev0.Waylan Limberg2020-02-082-1/+3
|
* Bump version to 3.2.0.3.2Waylan Limberg2020-02-063-10/+13
|
* Link test tools and development env documentation.Waylan Limberg2020-02-063-7/+15
| | | Resolves #892.
* Simplify xml.etree.ElementTree loading (#902)Dmitry Shachnev2020-02-0317-143/+131
| | | | | | | | 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.
* Don't emit stashed HTML tag placeholders in `.toc_tokens` (#901)Jim Porter2020-01-312-28/+87
| | | | | | Note: this slightly changes existing behavior in that raw HTML tags are no longer included in the HTML `.toc`. However, the fact that that worked before was an oversight. The intention was always to strip all markup. Resolves #899.
* Add permalink_title option (#886)Waylan Limberg2019-11-264-7/+43
| | | | | 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-264-3/+90
| | | | | | | | | 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.
* Remove tox.ini from MANIFESTWaylan Limberg2019-11-261-1/+0
| | | | | | | | Tox has already been removed from `make test` and is no longer recommended for testing in the contributing guide. Additionally, the extra tests it runs (checking the spelling of documentation, etc) are of no value to end users. As things are currently set us, tox is only used on the Travis CI server. Given the above, there is no reason to include it in the release tarball. Closes #808.
* Document thread safety (#882)Waylan Limberg2019-11-253-2/+10
| | | | | Fixed #812.
* Unescape IDs in TOC.Waylan Limberg2019-11-252-1/+42
| | | | | | The slugify function will stript the STX and ETX characters from placeholders for backslash excaped characters. Therefore, we need to unescape any text before passing it to slugify. Fixes #864.
* Show readable error on Python2Waylan Limberg2019-11-251-5/+12
| | | | | | | | | Ensures anyone still using Python 2 gets a readable error message. This does not specify a specific version number to remove the maintenance burden of updating it with each future release. It will likely get removed in the next few releases as it will have served its purpose by then. Fixes #871.
* Bump version to 3.2.dev0.Waylan Limberg2019-11-251-1/+1
| | | | | | As per the Contributing Guide, this should have happened before we commited various 3.2 related changes. In any event, version 3.2 is now officially in development status.