Add unique key to highlight codeblock line numbers (#254)

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
mrdrogdrog 2020-06-23 00:46:22 +02:00 committed by GitHub
parent 8133d565cf
commit a03e341f22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,7 @@ export const HighlightedCode: React.FC<HighlightedCodeProps> = ({ code, language
{
highlightedCode
.map((line, index) => {
return <span data-line-number={index + 1}/>
return <span key={index} data-line-number={index + 1}/>
})
}
</span>