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 df44645
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 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"}.
---
10 changes: 7 additions & 3 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</template>

<script setup lang="ts">
import { useDefinitionCounterStore, usePropositionCounterStore, useTheoremCounterStore } from '@/stores/counter';
import { useDefinitionCounterStore, useEquationCounterStore, useExerciseCounterStore, useLemmaCounterStore, usePropositionCounterStore, useRemarkCounterStore, useTheoremCounterStore } from '@/stores/counter';
import { useSummaryStore } from '@/stores/summary';
const { fullPath } = useRoute()
Expand All @@ -69,7 +69,11 @@ const summaryStore = useSummaryStore();
summaryStore.setTree(tree);
summaryStore.setFlattened(flattened);
useDefinitionCounterStore().zero()
usePropositionCounterStore().zero();
useTheoremCounterStore().zero();
useLemmaCounterStore().zero();
useDefinitionCounterStore().zero();
usePropositionCounterStore().zero();
useExerciseCounterStore().zero();
useRemarkCounterStore().zero();
useEquationCounterStore().zero();
</script>
7 changes: 7 additions & 0 deletions server/plugins/content.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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 df44645

Please sign in to comment.