Skip to content

Commit

Permalink
update: generate-snippet.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryoga-exe committed Oct 23, 2022
1 parent df28b4a commit 3ff830f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions generate-snippet.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def create_snippet(file_path):
options = {}

for index, line in enumerate(lines):
if line == '/// start':
if line.strip() == '/// start':
startline = index + 1
if line.startswith('/// @'):
key = line[5:].split(' ')[0]
value = line[5 + len(key) + 1:]
if line.strip().startswith('/// @'):
key = line.strip()[5:].split(' ')[0]
value = line.strip()[5 + len(key) + 1:]
if key == 'isFileTemplate':
if value == 'true':
options[key] = True
Expand Down Expand Up @@ -101,4 +101,4 @@ def write_file(snippets, directory, filename):
write_file(snippets, directory, filename)

print("Created", filename, "from", dir_name)

0 comments on commit 3ff830f

Please sign in to comment.