executablebooks / mdit-py-plugins

Collection of core plugins for markdown-it-py
https://mdit-py-plugins.readthedocs.io
MIT License
30 stars 32 forks source link

👌 Centralise code block test #83

Closed chrisjsewell closed 1 year ago

chrisjsewell commented 1 year ago

All block level rules first test whether the first character is indented enough to be a code block. This logic is centralised, and allows for the StateBlock.is_code_block method, coming in markdown-it-py v3.0.0

codecov[bot] commented 1 year ago

Codecov Report

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

Comparison is base (875bbe5) 92.92% compared to head (7a391e9) 92.80%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #83 +/- ## ========================================== - Coverage 92.92% 92.80% -0.12% ========================================== Files 30 31 +1 Lines 1752 1779 +27 ========================================== + Hits 1628 1651 +23 - Misses 124 128 +4 ``` | Flag | Coverage Δ | | |---|---|---| | pytests | `92.80% <78.26%> (-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/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | Coverage Δ | | |---|---|---| | [mdit\_py\_plugins/myst\_blocks/index.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL215c3RfYmxvY2tzL2luZGV4LnB5) | `95.60% <57.14%> (+0.04%)` | :arrow_up: | | [mdit\_py\_plugins/admon/index.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL2FkbW9uL2luZGV4LnB5) | `96.42% <66.66%> (-0.82%)` | :arrow_down: | | [mdit\_py\_plugins/deflist/index.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL2RlZmxpc3QvaW5kZXgucHk=) | `94.36% <66.66%> (-0.60%)` | :arrow_down: | | [mdit\_py\_plugins/dollarmath/index.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL2RvbGxhcm1hdGgvaW5kZXgucHk=) | `91.12% <66.66%> (+0.05%)` | :arrow_up: | | [mdit\_py\_plugins/footnote/index.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL2Zvb3Rub3RlL2luZGV4LnB5) | `94.84% <66.66%> (-0.34%)` | :arrow_down: | | [mdit\_py\_plugins/substitution.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL3N1YnN0aXR1dGlvbi5weQ==) | `88.05% <66.66%> (+0.18%)` | :arrow_up: | | [mdit\_py\_plugins/colon\_fence.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL2NvbG9uX2ZlbmNlLnB5) | `96.87% <75.00%> (+0.04%)` | :arrow_up: | | [mdit\_py\_plugins/container/index.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL2NvbnRhaW5lci9pbmRleC5weQ==) | `96.90% <75.00%> (-0.97%)` | :arrow_down: | | [mdit\_py\_plugins/amsmath/\_\_init\_\_.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL2Ftc21hdGgvX19pbml0X18ucHk=) | `95.74% <100.00%> (+0.09%)` | :arrow_up: | | [mdit\_py\_plugins/attrs/index.py](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-bWRpdF9weV9wbHVnaW5zL2F0dHJzL2luZGV4LnB5) | `92.17% <100.00%> (+0.06%)` | :arrow_up: | | ... and [3 more](https://app.codecov.io/gh/executablebooks/mdit-py-plugins/pull/83?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | |

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