parent
3a94523d65
commit
a6026ce48a
|
@ -1,3 +1,7 @@
|
||||||
|
##################
|
||||||
|
# Test blacklist #
|
||||||
|
##################
|
||||||
|
|
||||||
ad.*
|
ad.*
|
||||||
ads.*
|
ads.*
|
||||||
banner.*
|
banner.*
|
||||||
|
|
|
@ -145,7 +145,7 @@ func StringStripSpaces(str string) string {
|
||||||
|
|
||||||
func TrimAndStripInlineComments(str string) string {
|
func TrimAndStripInlineComments(str string) string {
|
||||||
if idx := strings.LastIndexByte(str, '#'); idx >= 0 {
|
if idx := strings.LastIndexByte(str, '#'); idx >= 0 {
|
||||||
if idx == 0 {
|
if idx == 0 || str[0] == '#' {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if prev := str[idx-1]; prev == ' ' || prev == '\t' {
|
if prev := str[idx-1]; prev == ' ' || prev == '\t' {
|
||||||
|
|
Loading…
Reference in New Issue