refactor: make conditions more robust

pull/3398/head
Divyansh Singh 11 months ago
parent 1c9f2aa8e4
commit 176c4008c5

@ -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({

Loading…
Cancel
Save