mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
Fix sources rendering [ci skip]
This commit is contained in:
parent
ea2a686cf7
commit
c922f8e8b0
|
@ -15,7 +15,7 @@ import Link from '../components/link'
|
||||||
import Grid from '../components/grid'
|
import Grid from '../components/grid'
|
||||||
import Infobox from '../components/infobox'
|
import Infobox from '../components/infobox'
|
||||||
import Accordion from '../components/accordion'
|
import Accordion from '../components/accordion'
|
||||||
import { join, arrayToObj, abbrNum, markdownToReact } from '../components/util'
|
import { join, arrayToObj, abbrNum, markdownToReact, isString } from '../components/util'
|
||||||
|
|
||||||
const MODEL_META = {
|
const MODEL_META = {
|
||||||
core: 'Vocabulary, syntax, entities, vectors',
|
core: 'Vocabulary, syntax, entities, vectors',
|
||||||
|
@ -109,7 +109,7 @@ function formatModelMeta(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatSources(data = []) {
|
function formatSources(data = []) {
|
||||||
const sources = Array.isArray(data) ? data.map(s => ({ name: s })) : data
|
const sources = data.map(s => (isString(s) ? { name: s } : s))
|
||||||
return sources.map(({ name, url, author }, i) => (
|
return sources.map(({ name, url, author }, i) => (
|
||||||
<>
|
<>
|
||||||
{i > 0 && ', '}
|
{i > 0 && ', '}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user