nfp_sites/base/article/util.mjs
2022-08-12 23:33:50 +00:00

17 lines
No EOL
391 B
JavaScript

import { contentToBlocks, parseMediaAndBanner } from '../util.mjs'
export function parseArticles(articles) {
for (let i = 0; i < articles.length; i++) {
parseArticle(articles[i])
}
return articles
}
export function parseArticle(article) {
if (!article) {
return null
}
article.content = contentToBlocks(article.content)
parseMediaAndBanner(article)
return article
}