File tree Expand file tree Collapse file tree 2 files changed +21
-15
lines changed Expand file tree Collapse file tree 2 files changed +21
-15
lines changed Original file line number Diff line number Diff line change 1- import { getVitepressMd } from '../markdown.js'
2- import { addWatchPaths , loadData } from '../utility.js'
3-
4- async function normalizeEventCategories ( categories ) {
5- const md = await getVitepressMd ( )
6-
7- for ( const [ k , v ] of Object . entries ( categories ) ) {
8- v . description = md . renderInline ( v . description )
9- }
10-
11- return categories
12- }
1+ import { loadEventCategories } from '../event_categories.js'
2+ import { addWatchPaths } from '../utility.js'
133
144export default addWatchPaths ( {
155 async load ( ) {
16- return await normalizeEventCategories (
17- structuredClone ( loadData ( 'event_categories' ) . categories )
18- )
6+ return await loadEventCategories ( )
197 }
208} )
Original file line number Diff line number Diff line change 1+ import { getVitepressMd } from './markdown.js'
2+ import { loadData } from './utility.js'
3+
4+ async function normalizeEventCategories ( categories ) {
5+ const md = await getVitepressMd ( )
6+
7+ for ( const [ k , v ] of Object . entries ( categories ) ) {
8+ v . description = md . renderInline ( v . description )
9+ }
10+
11+ return categories
12+ }
13+
14+ export async function loadEventCategories ( ) {
15+ return await normalizeEventCategories (
16+ structuredClone ( loadData ( 'event_categories' ) . categories )
17+ )
18+ }
You can’t perform that action at this time.
0 commit comments