Skip to content

Commit

Permalink
Merge pull request #17 from setten/master
Browse files Browse the repository at this point in the history
some new keywords have [ and ] in the name
  • Loading branch information
lauri-codes authored Jun 7, 2022
2 parents 95bfde0 + c8e586a commit 2034ec6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions inputparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def validify_section(string):
changed = True
string = "NUM" + string

if '[' in string:
changed = True
string = string.replace("[", "_").replace("]", "")

if changed:
print(" Section {} replaced with {}".format(original, string))
return string
Expand All @@ -55,6 +59,10 @@ def validify_keyword(string):
changed = True
string = "NUM" + string

if '[' in string:
changed = True
string = string.replace("[", "_").replace("]", "")

if changed:
print(" Keyword {} replaced with {}".format(original, string))

Expand Down

0 comments on commit 2034ec6

Please sign in to comment.