executablebooks / markdown-it-py

Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed. Now in Python!
https://markdown-it-py.readthedocs.io
MIT License
706 stars 68 forks source link

♻️ Refactor backslash escape logic #276

Closed chrisjsewell closed 1 year ago

chrisjsewell commented 1 year ago

Smartquotes, typographic replacements and plain text links can now be escaped with backslash (e.g. \(c) or google\.com are no longer replaced).

Implements upstream: https://github.com/markdown-it/markdown-it/commit/75037c6514e99c9b4fa300f62f04913fee4ea0e2

Breaking:

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 90.90% and project coverage change: -0.12 :warning:

Comparison is base (500e69e) 95.22% compared to head (3a86d3b) 95.11%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #276 +/- ## ========================================== - Coverage 95.22% 95.11% -0.12% ========================================== Files 62 63 +1 Lines 3353 3377 +24 ========================================== + Hits 3193 3212 +19 - Misses 160 165 +5 ``` | Flag | Coverage Δ | | |---|---|---| | pytests | `95.11% <90.90%> (-0.12%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | Coverage Δ | | |---|---|---| | [markdown\_it/parser\_inline.py](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWFya2Rvd25faXQvcGFyc2VyX2lubGluZS5weQ==) | `95.38% <ø> (ø)` | | | [markdown\_it/presets/commonmark.py](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWFya2Rvd25faXQvcHJlc2V0cy9jb21tb25tYXJrLnB5) | `100.00% <ø> (ø)` | | | [markdown\_it/presets/zero.py](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWFya2Rvd25faXQvcHJlc2V0cy96ZXJvLnB5) | `100.00% <ø> (ø)` | | | [markdown\_it/rules\_inline/escape.py](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWFya2Rvd25faXQvcnVsZXNfaW5saW5lL2VzY2FwZS5weQ==) | `87.17% <86.11%> (-12.83%)` | :arrow_down: | | [markdown\_it/parser\_core.py](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWFya2Rvd25faXQvcGFyc2VyX2NvcmUucHk=) | `100.00% <100.00%> (ø)` | | | [markdown\_it/rules\_core/\_\_init\_\_.py](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWFya2Rvd25faXQvcnVsZXNfY29yZS9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [markdown\_it/rules\_core/text\_join.py](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWFya2Rvd25faXQvcnVsZXNfY29yZS90ZXh0X2pvaW4ucHk=) | `100.00% <100.00%> (ø)` | | | [markdown\_it/rules\_inline/\_\_init\_\_.py](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWFya2Rvd25faXQvcnVsZXNfaW5saW5lL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [markdown\_it/rules\_inline/fragments\_join.py](https://app.codecov.io/gh/executablebooks/markdown-it-py/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWFya2Rvd25faXQvcnVsZXNfaW5saW5lL2ZyYWdtZW50c19qb2luLnB5) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.