Skip to content

Commit fa2c17e

Browse files
authored
fix: ignore all whitespace lines (#201)
1 parent ea4e019 commit fa2c17e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/ini.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const decode = str => {
7272
const lines = str.split(/[\r\n]+/g)
7373

7474
for (const line of lines) {
75-
if (!line || line.match(/^\s*[;#]/)) {
75+
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
7676
continue
7777
}
7878
const match = line.match(re)

test/fixtures/foo.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ o = p
1010
1111
; Test single quotes
1212
s = 'something'
13-
13+
1414
; Test mixing quotes
1515
1616
s1 = "something'

0 commit comments

Comments
 (0)