feat: add rehype-katex-notranslate plugin for preventing symbols in formulas to be translated by browser translate-tools. (#1049)

* fix(format): format the codes

* fix(format): format the code

* feat: add rehype-katex-notranslate plugin to prevent symbol in formulas to be translated.

* update(dep): update `rehype-katex-notranslate` version
This commit is contained in:
秋刀鱼之愿
2024-11-03 17:01:35 +08:00
committed by GitHub
parent 35ec4b25ef
commit 6289f94e87
5 changed files with 18 additions and 2 deletions
+2
View File
@@ -18,6 +18,7 @@ import {
import rehypeSlug from 'rehype-slug'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
import rehypeKatex from 'rehype-katex'
import rehypeKatexNoTranslate from 'rehype-katex-notranslate'
import rehypeCitation from 'rehype-citation'
import rehypePrismPlus from 'rehype-prism-plus'
import rehypePresetMinify from 'rehype-preset-minify'
@@ -169,6 +170,7 @@ export default makeSource({
},
],
rehypeKatex,
rehypeKatexNoTranslate,
[rehypeCitation, { path: path.join(root, 'data') }],
[rehypePrismPlus, { defaultLanguage: 'js', ignoreMissing: true }],
rehypePresetMinify,