Skip to content

Commit

Permalink
pona: ilo Codeblock o sona e linja sin toki kepeken nasin MULTILINE
Browse files Browse the repository at this point in the history
ni li pakala e alasa, taso mi ken ala pona e ni lon tenpo ni
  • Loading branch information
gregdan3 committed Aug 17, 2024
1 parent a102894 commit 2b4471b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sonatoki/Preprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ class Codeblock(RegexPreprocessor):
Subset of what would be removed by Backticks, but may be preferable.
"""

pattern = re.compile(r"```\n(?:(?!```).*?)?```", flags=re.DOTALL)
pattern = re.compile(
r"^```(?:[\w\-]+)?$(?:(?!```).*?)^```$",
flags=re.MULTILINE | re.DOTALL,
)


class Spoilers(RegexPreprocessor):
Expand Down

0 comments on commit 2b4471b

Please sign in to comment.