Fix a missing key.

This commit is contained in:
Tom Alexander 2024-01-27 18:57:01 -05:00
parent 0e02e09018
commit 5feac8e4d7
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -24,7 +24,7 @@ function buildShadow(highlights: Highlight[], text: string): ReactNode[] {
} else if (state == ShadowState.Highlight) {
if (remaining_highlights.length > 0 && i == remaining_highlights[0].end) {
// End the span
output.push(<span className="highlighted">{buffer}</span>);
output.push(<span key={i} className="highlighted">{buffer}</span>);
buffer = chr;
state = ShadowState.Text;
remaining_highlights = remaining_highlights.slice(1);