Skip to content

Commit a6026ce

Browse files
committed
Ignore lines starting with '#'
Fixes #1171
1 parent 3a94523 commit a6026ce

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.ci/blacklist.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##################
2+
# Test blacklist #
3+
##################
4+
15
ad.*
26
ads.*
37
banner.*

dnscrypt-proxy/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func StringStripSpaces(str string) string {
145145

146146
func TrimAndStripInlineComments(str string) string {
147147
if idx := strings.LastIndexByte(str, '#'); idx >= 0 {
148-
if idx == 0 {
148+
if idx == 0 || str[0] == '#' {
149149
return ""
150150
}
151151
if prev := str[idx-1]; prev == ' ' || prev == '\t' {

0 commit comments

Comments
 (0)