summaryrefslogtreecommitdiff
path: root/tests/test_syntax
Commit message (Collapse)AuthorAgeFilesLines
...
* Unescape IDs in TOC.Waylan Limberg2019-11-251-0/+34
| | | | | | 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.
* Drop support for Python 2.7 (#865)Hugo van Kemenade2019-10-2418-23/+0
| | | | | | | * 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.
* Refactor em strong to consolidate code and fix issue #792Isaac Muse2019-09-032-0/+45
|
* Optimize HTML_RE from quadratic time to linear (#804)Anders Kaseorg2019-08-141-0/+31
| | | | | | Remove misleading escaped_chars_in_js test Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* Use https:// links where availableJon Dufresne2019-06-121-3/+3
|
* Handle overlapping raw HTML matches (#770)Philip Trauner2019-02-071-0/+53
| | | | | Recursively run substitution to handle overlapping matches. Fixes #458.
* Emphasis pattern treats newlines as whitespace (#785)Waylan Limberg2019-02-071-0/+86
| | | | | | All whitespace characters should be treated the same by inline patterns. Previoulsy, emphasis patterns were only accounting for spaces, but not other whitepsace characters such as newlines. Fixes #783.
* Allow hashes to be escaped in headers (#763)Isaac Muse2018-12-221-0/+20
| | | | | Adjust pattern to allow for escaped hashes, but take care to not treat escaped escapes before hashes as escaped hashes. Close #762.
* Collapse all whitespace in reference ids (#743)Isaac Muse2018-10-301-0/+37
| | | Previously only newlines preceded by whitespace were collapsed. Fixes #742.
* foot note adjustments (#728)Isaac Muse2018-10-091-0/+65
| | | | | | Add a config to set the footnote separator. Also remove rel/rev as they aren't really compatible with HTML5 and we already have classes set for refs and backrefs. Fixes 723.
* Add a test for the markdown/serializers.py changeDmitry Shachnev2018-09-251-0/+4
|
* Make ENTITY_RE support hexadecimal entitiesissue712Dmitry Shachnev2018-09-251-0/+44
| | | | Fixes #712.
* smart_emphasis keyword > legacy_em extension.Waylan Limberg2018-07-311-0/+40
| | | | | | | | | The smart_strong extension has been removed and its behavior is now the default (smart em and smart strong are the default). The legacy_em extension restores legacy behavior (no smart em or smart strong). This completes the removal of keywords. All parser behavior is now modified by extensions, not by keywords on the Markdown class.
* Fix double escaping of amp in attributes (#670)Isaac Muse2018-07-292-0/+12
| | | | | | | | | | Serializer should only escape & in attributes if not part of &amp; Better regex avoid Unicode and `_` in amp detection. In general, we don't want to escape already escaped content, but with code content, we want literal representations of escaped content, so have code content explicitly escape its content before placing in AtomicStrings. Closes #669.
* Consistent copyright headers.Waylan Limberg2018-07-2712-0/+258
| | | | Fixes #435.
* Moved enable_attributes keyword to extension: legacy_attrs.Waylan Limberg2018-07-241-0/+48
| | | | | | | If you have existing documents that use the legacy attributes format, then you should enable the legacy_attrs extension for those documents. Everyone is encouraged to use the attr_list extension going forward. Closes #643. Work adapted from 0005d7a of the md3 branch.
* Only strip spaces in tables (#644)Isaac Muse2018-02-222-0/+43
| | | | | Strip only the space character and not things like nbsp in tables. Fixes #635.
* Flexible inline (#629)Isaac Muse2018-01-173-0/+237
| | | | Add new InlineProcessor class that handles inline processing much better and allows for more flexibility. This adds new InlineProcessors that no longer utilize unnecessary pretext and posttext captures. New class can accept the buffer that is being worked on and manually process the text without regex and return new replacement bounds. This helps us to handle links in a better way and handle nested brackets and logic that is too much for regular expression. The refactor also allows image links to have links/paths with spaces like links. Ref #551, #613, #590, #161.
* Correct spelling mistakes.Edward Betts2018-01-131-1/+1
|
* Provide new testing framework.Waylan Limberg2018-01-086-0/+1305
As a part of the Markdown lib, test tools can be used by third party extensions. Also keeps test dir clean as it only contains actual tests. More work in this vein to come as the need for Nose is removed. Tests are defined as Unittests rather than in text files allowing features to be more easily broken into units and run individually. Based completely on standard lib unittest with no external dependencies. Use `python -m unittest tests.test_syntax` to run. Pulled some tests from https://github.com/karlcow/markdown-testsuite. Many more test units to pull from that source. As we encounter the need to edit an existing textfile-based test, or add a new test, a new test should be created with this framework and the old test should be deleted. Also need to delete existing testfile-based tests which are covered in the new tests included here.