summaryrefslogtreecommitdiff
path: root/tests/test_syntax/inline
Commit message (Collapse)AuthorAgeFilesLines
* Improve standalone * and _ parsing.Waylan Limberg2022-11-151-3/+45
| | | | | | | | | | | The `NOT_STRONG_RE` regex matchs 1, 2, or 3 * or _ which are surrounded by white space to prevent them from being parsed as tokens. However, the surrounding white space should not be consumed by the regex, which is why lookhead and lookbehind assertions are used. As `^` cannot be matched in a lookbehind assertion, it is left outside the assertion, but as it is zero length, that should not matter. Tests added and/or updated to cover various edge cases. Fixes #1300.
* Disallow square brackets in reference link ids.Waylan Limberg2022-01-101-0/+34
| | | | | | We already disallow right square brackets. This also disallows left square brackets, which ensures link references will be less likely to collide with standard links in some weird edge cases. Fixes #1209.
* Improve email address validation for Automatic LinksCarlos2021-08-111-0/+63
|
* Refactor HTML Parser (#803)Waylan Limberg2020-09-221-1/+181
| | | | | | | | | | 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.
* Support short reference image links.Waylan Limberg2020-07-011-0/+24
| | | | Fixes #894.
* Fix issues with complex emphasisfacelessuser2020-06-221-0/+14
| | | | | Resolves issue that can occur with complex emphasis combinations. Fixes #979
* Drop support for Python 2.7 (#865)Hugo van Kemenade2019-10-246-6/+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-031-0/+31
|
* 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>
* 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.
* Collapse all whitespace in reference ids (#743)Isaac Muse2018-10-301-0/+37
| | | Previously only newlines preceded by whitespace were collapsed. Fixes #742.
* 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.
* 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-273-0/+65
| | | | Fixes #435.
* 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.