Skip to content

Commit fa12258

Browse files
committed
compare line to chr0 instead of checking length
1 parent 84e8020 commit fa12258

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ module.exports = function downdoc (asciidoc, { attributes: initialAttrs = {} } =
244244
}
245245
} else if (chr0 === '.') {
246246
subs = NORMAL_SUBS
247-
if (line.length > 1 && !(line[1] === '.' && line[2] === '.')) {
247+
if (line !== chr0 && !(line[1] === '.' && line[2] === '.')) {
248248
const text = line[1] === '*' && line[line.length - 1] === '*' ? line.slice(2, -1) : line.substring(1)
249249
blockTitle = (line = undefined) || { indent, text, subs }
250250
}

0 commit comments

Comments
 (0)