mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 10:16:27 +03:00
Fix problem with span
inside inline code
React doesn't allow a `span` inside an inline `code` element and throws an error in dev mode.
This commit is contained in:
parent
5e1a10f617
commit
a280729491
|
@ -94,12 +94,12 @@ export const TypeAnnotation = ({ lang = 'python', link = true, children }) => {
|
|||
}
|
||||
)
|
||||
return (
|
||||
<code className={annotClassNames} aria-label="Type annotation">
|
||||
<span className={annotClassNames} role="code" aria-label="Type annotation">
|
||||
{elements.map((el, i) => (
|
||||
<Fragment key={i}>{linkType(el, !!link)}</Fragment>
|
||||
))}
|
||||
{meta && <span className={classes['type-annotation-meta']}>{meta}</span>}
|
||||
</code>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user