Skip to content

Commit

Permalink
chore(*): adapt "\[\]" syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiyo5hi committed Nov 1, 2023
1 parent 34fcc3a commit 9f271f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
8 changes: 1 addition & 7 deletions content/math-3a/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
---
title: MATH 3A
---

::Theorem{tag="Test"}
This is a test
::

Check Theorem :Reference{tag="Test"}.
---
8 changes: 8 additions & 0 deletions server/plugins/content.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default defineNitroPlugin((nitroApp) => {
nitroApp.hooks.hook('content:file:beforeParse', (file) => {
if (file._id.endsWith('.md')) {
file.body = file.body.replace(/\\(\[|\])/g, '\$\$')
}
})
})

3 changes: 0 additions & 3 deletions server/tsconfig.json

This file was deleted.

0 comments on commit 9f271f3

Please sign in to comment.