parser: remove surrounding quotes for empty value (#97)
Unknwon
7 years ago
36 | 36 |
|
37 | 37 |
// Maximum allowed depth when recursively substituing variable names.
|
38 | 38 |
_DEPTH_VALUES = 99
|
39 | |
_VERSION = "1.27.0"
|
|
39 |
_VERSION = "1.27.1"
|
40 | 40 |
)
|
41 | 41 |
|
42 | 42 |
// Version returns current package version literal.
|
188 | 188 |
// are quotes \" or \'.
|
189 | 189 |
// It returns false if any other parts also contain same kind of quotes.
|
190 | 190 |
func hasSurroundedQuote(in string, quote byte) bool {
|
191 | |
return len(in) > 2 && in[0] == quote && in[len(in)-1] == quote &&
|
|
191 |
return len(in) >= 2 && in[0] == quote && in[len(in)-1] == quote &&
|
192 | 192 |
strings.IndexByte(in[1:], quote) == len(in)-2
|
193 | 193 |
}
|
194 | 194 |
|