Preparing scheduled task for Obsidian sync + Repare OFM html not rendered
This commit is contained in:
parent
7e318d4a12
commit
a9a98b9618
|
|
@ -6,6 +6,7 @@ import RemarkRehype from 'remark-rehype';
|
|||
import RemarkOfm from 'remark-ofm';
|
||||
import RemarkBreaks from 'remark-breaks'
|
||||
import RemarkGfm from 'remark-gfm';
|
||||
import RehypeRaw from 'rehype-raw';
|
||||
|
||||
export default function useMarkdown(): (md: string) => Root
|
||||
{
|
||||
|
|
@ -14,7 +15,9 @@ export default function useMarkdown(): (md: string) => Root
|
|||
const parse = (markdown: string) => {
|
||||
if (!processor)
|
||||
{
|
||||
processor = unified().use([RemarkParse, RemarkBreaks, RemarkGfm, RemarkOfm, RemarkRehype]);
|
||||
processor = unified().use([RemarkParse, RemarkGfm, RemarkOfm, RemarkBreaks]);
|
||||
processor.use(RemarkRehype, { allowDangerousHtml: true });
|
||||
processor.use(RehypeRaw);
|
||||
}
|
||||
|
||||
const processed = processor.runSync(processor.parse(markdown)) as Root;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,16 @@ export default defineNuxtConfig({
|
|||
pathPrefix: false,
|
||||
},
|
||||
],
|
||||
nitro: {
|
||||
experimental: {
|
||||
tasks: true,
|
||||
},
|
||||
scheduledTasks: {
|
||||
'* * * * *': ['sync']
|
||||
}
|
||||
},
|
||||
security: {
|
||||
rateLimiter: false
|
||||
},
|
||||
compatibilityDate: '2024-07-25'
|
||||
compatibilityDate: '2024-07-25',
|
||||
})
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue