nfp_sites/base/article/util.mjs

17 lines
391 B
JavaScript
Raw Normal View History

import { contentToBlocks, parseMediaAndBanner } from '../util.mjs'
2022-07-27 08:41:18 +00:00
2022-07-26 02:55:37 +00:00
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)
2022-07-26 02:55:37 +00:00
return article
}