We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c89943 commit 563020bCopy full SHA for 563020b
src/node/markdown/plugins/highlight.ts
@@ -147,11 +147,8 @@ export async function highlight(
147
return s
148
}
149
150
- const fillEmptyHighlightedLine = (s: string) => {
151
- return s.replace(
152
- /(<span class="line highlighted">)(<\/span>)/g,
153
- '$1<wbr>$2'
154
- )
+ const fillEmptyLines = (s: string) => {
+ return s.replace(/(<span class="line[^>]*>)(<\/span>)/g, '$1<wbr>$2')
155
156
157
str = removeMustache(str).trimEnd()
@@ -175,6 +172,6 @@ export async function highlight(
175
172
: { theme })
176
173
})
177
174
178
- return fillEmptyHighlightedLine(restoreMustache(highlighted))
+ return fillEmptyLines(restoreMustache(highlighted))
179
180
0 commit comments