Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ def file_parser(file):
extracted = []

for line in vmf.readlines()[1:]:
if "}" in line:
if "}" in line and '"' not in line:
indent -= 1
if indent == 0: # If indent is not 0 we know it's a child category and not a main category
extracted.append(t)
continue

if "{" in line:
if "{" in line and '"' not in line:
if indent > 0: # If indent is not 0 we know it's a child category and not a main category
# Open curly brackets ALWAYS follow a category, so we know the previous line is the category name
t.add_child(previous_line, indent)
Expand Down