From f4ec021a122e1a640ecef711d0248666b167292f Mon Sep 17 00:00:00 2001 From: Chen Leo Date: Tue, 9 Feb 2021 16:16:20 +0800 Subject: [PATCH] =?UTF-8?q?docsify:=20=E6=B3=A8=E5=85=A5=E9=92=A9=E5=AD=90?= =?UTF-8?q?=EF=BC=8C=E5=B0=86katex=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9A=84?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=E6=9B=BF=E6=8D=A2=E4=B8=BA=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=9A=84=E5=85=AC=E5=BC=8F=20=E5=8F=AF=E8=83=BD=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=E6=B8=B2=E6=9F=93=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 53116f9..b8ff2d8 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,18 @@ window.$docsify = { loadSidebar: 'content.md', subMaxLevel: 2, - plugins: [], + plugins: [ + //注入钩子,将katex目前不支持的公式环境替换为支持的 + function (hook) { + hook.beforeEach(function (content) { + return content + .replace(/\\begin\{align\*\}/g, '\\begin{aligned}') + .replace(/\\end\{align\*\}/g, '\\end{aligned}') + .replace(/\\begin\{gather\*\}/g, '\\begin{gathered}') + .replace(/\\end\{gather\*\}/g, '\\end{gathered}'); + }); + } + ], name: 'Coursera吴恩达机器学习课程整理', repo: 'https://github.com/scruel/ML-AndrewNg-Notes' }