Skip to content

Commit

Permalink
safemin update for @as
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaylaFischler committed Nov 8, 2024
1 parent 801fd99 commit 661bef0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build/safemin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def minify(path: str):
contents = f.read()
f.close()

if re.search(r'--+\[(?!\[@as)+', contents) != None:
# remove --[[@as type]] hints before anything, since it would detect as multiline comments
contents = re.sub(r' --+\[.+]]', '', contents)

if re.search(r'--+\[+', contents) != None:
# absolutely not dealing with lua multiline comments
# - there are more important things to do
# - this minification is intended to be 100% safe, so working with multiline comments is asking for trouble
Expand Down

0 comments on commit 661bef0

Please sign in to comment.