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 normalizeEventReasons ( reasons ) {
5
- const md = await getVitepressMd ( )
6
-
7
- for ( const [ k , v ] of Object . entries ( reasons ) ) {
8
- v . description = md . renderInline ( v . description )
9
- }
10
-
11
- return reasons
12
- }
1
+ import { addWatchPaths } from '../utility.js'
2
+ import { loadEventReasons } from '../event_reasons.js'
13
3
14
4
export default addWatchPaths ( {
15
5
async load ( ) {
16
- return await normalizeEventReasons (
17
- structuredClone ( loadData ( 'event_reasons' ) . reasons )
18
- )
6
+ return await loadEventReasons ( )
19
7
}
20
8
} )
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 normalizeEventReasons ( reasons ) {
5
+ const md = await getVitepressMd ( )
6
+
7
+ for ( const [ k , v ] of Object . entries ( reasons ) ) {
8
+ v . description = md . renderInline ( v . description )
9
+ }
10
+
11
+ return reasons
12
+ }
13
+
14
+ export async function loadEventReasons ( ) {
15
+ return await normalizeEventReasons (
16
+ structuredClone ( loadData ( 'event_reasons' ) . reasons )
17
+ )
18
+ }
You can’t perform that action at this time.
0 commit comments