Skip to content

Commit 830fce8

Browse files
authored
perf: reduce the number of regexp calls (#317)
1 parent 0562dd7 commit 830fce8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/renderer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const renderer = {
124124
const text = this.parser.parseInline(tokens);
125125
const { descriptionLists = true } = this.options;
126126

127-
if (descriptionLists) {
127+
if (descriptionLists && text.includes('<br>:')) {
128128
if (rDlSyntax.test(text)) {
129129
return text.replace(rDlSyntax, '<dl><dt>$1</dt><dd>$2</dd></dl>');
130130
}

0 commit comments

Comments
 (0)