mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-22 21:04:07 +08:00
fix(lanzou): optimize RemoveJSComment function to improve comment removal logic
This commit is contained in:
parent
c088f64567
commit
8b6fb5ed11
@ -92,11 +92,8 @@ func RemoveJSComment(data string) string {
|
||||
result.WriteByte(v)
|
||||
continue
|
||||
}
|
||||
if inComment {
|
||||
if v == '*' && i+1 < len(data) && data[i+1] == '/' {
|
||||
inComment = false
|
||||
i++
|
||||
}
|
||||
if inComment && v == '*' && i+1 < len(data) && data[i+1] == '/' {
|
||||
inComment = false
|
||||
continue
|
||||
}
|
||||
if v == '/' && i+1 < len(data) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user