Improved codeblock detection.
This commit is contained in:
parent
c8368d9b2f
commit
7d5578e204
1 changed files with 4 additions and 2 deletions
6
omg.py
6
omg.py
|
@ -97,8 +97,10 @@ class OMG:
|
||||||
if line == "":
|
if line == "":
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if line.startswith("```"): # detect codeblocks and ignore everything inside it
|
if "```" in line: # detect codeblocks and ignore everything inside it
|
||||||
codeblock = not codeblock
|
if not "```" in line[line.find("```"):]:
|
||||||
|
codeblock = not codeblock
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if codeblock:
|
if codeblock:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue