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 5baf589 commit 7e78372Copy full SHA for 7e78372
packages/dito/app/components/ParagraphList.tsx
@@ -28,6 +28,9 @@ function PrincipleHighlight(
28
}
29
30
const parts = (children.props.children as string).split(/(\[\d\])/g);
31
+ if (!parts[1]) {
32
+ return parts[0]; // No matching principle tag, return unmodified content
33
+ }
34
const number = Number(parts[1][1]) as keyof typeof HIGHLIGHT_COLORS;
35
36
return principlesToShow.includes(number) ? (
0 commit comments