diff --git a/omg.py b/omg.py index 14a6c79..4ecf296 100755 --- a/omg.py +++ b/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: