diff --git a/website/src/templates/models.js b/website/src/templates/models.js index b9cd81c97..4713f4b34 100644 --- a/website/src/templates/models.js +++ b/website/src/templates/models.js @@ -14,7 +14,7 @@ import Icon from '../components/icon' import Link from '../components/link' import Grid from '../components/grid' import Infobox from '../components/infobox' -import { join, arrayToObj, abbrNum } from '../components/util' +import { join, arrayToObj, abbrNum, markdownToReact } from '../components/util' const MODEL_META = { core: 'Vocabulary, syntax, entities, vectors', @@ -43,6 +43,10 @@ const MODEL_META = { compat: 'Latest compatible model version for your spaCy installation', } +const MARKDOWN_COMPONENTS = { + code: InlineCode, +} + function getModelComponents(name) { const [lang, type, genre, size] = name.split('_') return { lang, type, genre, size } @@ -192,10 +196,8 @@ const Model = ({ name, langId, langName, baseUrl, repo, compatibility, hasExampl python -m spacy download {name} - {meta.description &&
{meta.description}
} - + {meta.description && markdownToReact(meta.description, MARKDOWN_COMPONENTS)} {isError && error} -