Commit 9e3ab4ed authored by Štěpán Balážik's avatar Štěpán Balážik

converter.py: fix for ignoring comments

Closes #7
parent b27974cd
Pipeline #43099 passed with stages
in 50 seconds
......@@ -66,14 +66,14 @@ class Converter:
def _ignore_comments(line: str):
if "#" in line and ";" not in line:
nocomment_line, comment = line.split("#")
nocomment_line, comment = line.split("#", 2)
elif "#" not in line and ";" in line:
nocomment_line, comment = line.split(";")
elif "#" in line and ";" in line:
if line.find("#") < line.find(";"):
nocomment_line, comment = line.split("#")
nocomment_line, comment = line.split("#", 2)
else:
nocomment_line, comment = line.split(";")
nocomment_line, comment = line.split(";", 2)
else:
nocomment_line = line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment