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 == "":
|
||||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue