Improved codeblock detection.

This commit is contained in:
The Wobbler 2025-04-10 11:23:11 +02:00
parent c8368d9b2f
commit 7d5578e204

6
omg.py
View file

@ -97,8 +97,10 @@ class OMG:
if line == "":
continue
if line.startswith("```"): # detect codeblocks and ignore everything inside it
codeblock = not codeblock
if "```" in line: # detect codeblocks and ignore everything inside it
if not "```" in line[line.find("```"):]:
codeblock = not codeblock
continue
if codeblock: