We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c837870 commit 87fadc3Copy full SHA for 87fadc3
src/blacken_docs/__init__.py
@@ -24,10 +24,10 @@
24
re.DOTALL | re.MULTILINE,
25
)
26
PYGMENTS_PY_LANG_CLASSES_RE_FRAGMENT = (
27
- f"({'|'.join([f'.{lang}' for lang in PYGMENTS_PY_LANGS])})"
+ "(" + "|".join([r"\." + lang for lang in PYGMENTS_PY_LANGS]) + ")"
28
29
MD_BRACE_RE = re.compile(
30
- r"(?P<before>^(?P<indent> *)```\s*\{\s*\."
+ r"(?P<before>^(?P<indent> *)```\s*\{\s*"
31
+ PYGMENTS_PY_LANG_CLASSES_RE_FRAGMENT
32
+ r"( [^\}\n]*?)?\}\s*?\n)"
33
r"(?P<code>.*?)"
0 commit comments