Skip to content

Commit 9d51d4d

Browse files
Updates
1 parent 08942a9 commit 9d51d4d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/compress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function compressFile(filePath) {
3333
let content = fs.readFileSync(filePath, 'utf8');
3434

3535
if (filePath.endsWith('.js')) {
36-
content = content.replace(/\/\/.*\n/g, '\n');
36+
content = content.replace(/(^|[^"'\`])\/\/.*\n/g, '$1\n');
3737
}
3838

3939
content = content.replace(/(\s*["'`])([^"'\n`]*)(["'`]\s*)/g, (match, p1, p2, p3) => {

src/modules/errmsg.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#!/bin/bash
2424
ERRORS_FILE="$GITHUB_ACTION_PATH/data/codes.json"
2525
ERROR_PREFIX="Just an Ultimate Site Tool"
26-
_N_="\n\n\n\n"
26+
NEWLINES="\n\n\n\n"
2727

2828
ErrorMessage() {
2929
local ERROR_CODE=$2
@@ -33,12 +33,12 @@ ErrorMessage() {
3333
if [[ $ERROR_CODE == 02* ]]; then
3434
ERROR_TYPE="Warning"
3535
fi
36-
echo -e "$_N_ $ERROR_PREFIX: $ERROR_TYPE $ERROR_CODE: $ERROR_MESSAGE $ERROR_LINK $_N_"
36+
echo -e "$NEWLINES $ERROR_PREFIX: $ERROR_TYPE $ERROR_CODE: $ERROR_MESSAGE $ERROR_LINK $NEWLINES"
3737
}
3838

3939
_justMessage() {
4040
local MESSAGE=$1
41-
echo -e "$_N_ $ERROR_PREFIX: INFO: $MESSAGE $_N_"
41+
echo -e "$NEWLINES $ERROR_PREFIX: INFO: $MESSAGE $NEWLINES"
4242
}
4343

4444
export -f ErrorMessage

0 commit comments

Comments
 (0)