Skip to content

Commit

Permalink
Star comments exist in some material files
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Jan 5, 2024
1 parent b7f5b50 commit 46b7774
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Version (dev)
--------------

* Fix entity keyvalues being lowercased when parsed from files.
* Allow VMTs to use ``/* */`` comments.

--------------
Version 2.3.15
Expand Down
7 changes: 6 additions & 1 deletion src/srctools/vmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ def __init__(
def parse(cls, data: Iterable[str], filename: str = '') -> 'Material':
"""Parse a VMT from the file."""
# Block escapes, so "files\test\tex" doesn't have a tab in it.
tok = Tokenizer(data, filename, string_bracket=True, allow_escapes=False)
tok = Tokenizer(
data, filename,
string_bracket=True,
allow_escapes=False,
allow_star_comments=True,
)

# First look for the shader name -
# which must be the first string
Expand Down

0 comments on commit 46b7774

Please sign in to comment.