Skip to content

Commit

Permalink
refactor: make conditions more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Dec 31, 2023
1 parent 1c9f2aa commit 176c400
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node/markdown/plugins/highlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ export async function highlight(
if (
span.type === 'element' &&
span.tagName === 'span' &&
Array.isArray(span.properties.class) &&
span.properties.class.includes('line') &&
span.children.length === 0
) {
span.children.push({
Expand Down

0 comments on commit 176c400

Please sign in to comment.