mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-09 13:41:45 +00:00
minifier: dont strip whitespace inside string literals
This commit is contained in:
parent
6ad5c7b5f6
commit
b678673d95
1 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
# Copyright (c) 2021 bleck9999
|
||||
# https://github.com/bleck9999/ts-minifier
|
||||
# Version: 700ce8d
|
||||
# Copyright (c) 2021 bleck9999
|
||||
# https://github.com/bleck9999/ts-minifier
|
||||
# Version: a1e97807
|
||||
|
||||
import argparse
|
||||
import itertools
|
||||
|
@ -322,13 +322,13 @@ def whitespacent(script: str):
|
|||
if part % 2 == 0:
|
||||
if not line[part]:
|
||||
break
|
||||
mcode += line[part].replace('\t', '') + ' '
|
||||
# turn lots of whitespace into one whitespace with one easy trick!
|
||||
mcode += ' '.join(line[part].split()) + ' '
|
||||
else:
|
||||
mcode += f'"{line[part]}"'
|
||||
|
||||
part += 1
|
||||
|
||||
mcode = " ".join(mcode.split()) # turn lots of whitespace into one whitespace with one easy trick!
|
||||
# tsv3 is still an absolute nightmare
|
||||
# so spaces have a couple edge cases
|
||||
# 1. the - operator which requires space between the right operand
|
||||
|
|
Loading…
Reference in a new issue