Commit 790e8898 authored by Štěpán Balážik's avatar Štěpán Balážik

converter.py: fix ignoring comments for real

parent 7bc92442
Pipeline #43101 passed with stages
in 48 seconds
......@@ -66,14 +66,14 @@ class Converter:
def _ignore_comments(line: str):
if "#" in line and ";" not in line:
nocomment_line, comment = line.split("#", 2)
nocomment_line, comment = line.split("#", 1)
elif "#" not in line and ";" in line:
nocomment_line, comment = line.split(";", 2)
nocomment_line, comment = line.split(";", 1)
elif "#" in line and ";" in line:
if line.find("#") < line.find(";"):
nocomment_line, comment = line.split("#", 2)
nocomment_line, comment = line.split("#", 1)
else:
nocomment_line, comment = line.split(";", 2)
nocomment_line, comment = line.split(";", 1)
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