Explorar el Código

fix: katex issue

Timothy Jaeryang Baek hace 5 meses
padre
commit
d6f3444141
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      src/lib/utils/marked/katex-extension.ts

+ 6 - 0
src/lib/utils/marked/katex-extension.ts

@@ -134,6 +134,9 @@ function inlineKatex(options) {
 		},
 		tokenizer(src, tokens) {
 			return katexTokenizer(src, tokens, false);
+		},
+		renderer(token) {
+			return `${token?.text ?? ''}`;
 		}
 	};
 }
@@ -147,6 +150,9 @@ function blockKatex(options) {
 		},
 		tokenizer(src, tokens) {
 			return katexTokenizer(src, tokens, true);
+		},
+		renderer(token) {
+			return `${token?.text ?? ''}`;
 		}
 	};
 }