summaryrefslogtreecommitdiff
path: root/tests/test_syntax/blocks
Commit message (Collapse)AuthorAgeFilesLines
* Use pyspelling to check spelling.Waylan Limberg2023-04-061-1/+1
| | | 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.
* [style]: fix various typos in docstrings and commentsFlorian Best2022-03-183-5/+5
|
* Use simplified regex for html placeholders (#1086)Waylan Limberg2020-12-081-0/+11
| | | Co-authored-by: Reilly Raab <raabrp@gmail.com>
* Properly parse unclosed tags in code spansWaylan Limberg2020-11-231-0/+105
| | | | | | | * fix unclosed pi in code span * fix unclosed dec in code span * fix unclosed tag in code span Closes #1066.
* Fix issues related to hr tagsIsaac Muse2020-10-241-0/+99
| | | | | | | | | | | 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/+23
| | | | Fixes #1055.
* Correctly parse raw `script` and `style` tags. (#1038)Waylan Limberg2020-10-121-0/+85
| | | | | | | * 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.
* Refactor HTML Parser (#803)Waylan Limberg2020-09-221-0/+1319
| | | | | | | | | | 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.
* Fix HR which follows strong em.Waylan Limberg2020-07-011-0/+16
| | | | Fixes #897.
* Limit depth of blockquotes using Python's recursion limit. (#991)Waylan Limberg2020-06-291-0/+51
| | | | | | | | | | | | | | | | | 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.
* Drop support for Python 2.7 (#865)Hugo van Kemenade2019-10-245-5/+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.
* Use https:// links where availableJon Dufresne2019-06-121-3/+3
|
* 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.
* Consistent copyright headers.Waylan Limberg2018-07-275-0/+109
| | | | Fixes #435.
* Correct spelling mistakes.Edward Betts2018-01-131-1/+1
|
* Provide new testing framework.Waylan Limberg2018-01-085-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.