forge
Explore
Log in

Don't you dare go Hollow

niri

Clone
★ 0

0 watching0 forksRustGPL-3.012.1 MiBb0eb8adIvan Molodetskikh3 months ago2857 commits

remove-must-fail.py19 lines, 521 bytesHistoryRawDownload
1from __future__ import annotations
2import re
3
4# todo: this could be done generically, so that any
5# ```language,annotation,anything-else
6# is reduced to
7# ```language
8# which is what's supported by mkdocs/pygments
9# also note: mkdocs provides ways to highlight lines, add line numbers
10# but these are added as
11# ```language linenums="1"
12# and not split by comma
13def on_page_markdown(
14 markdown: str, *, page, config, files
15):
16 return re.sub(
17 r",must-fail",
18 '', markdown, flags = re.I | re.M
19 )