Commit 7b21b718 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac

parent 6e5b557a
...@@ -95,7 +95,6 @@ function inlineKatex(options, renderer) { ...@@ -95,7 +95,6 @@ function inlineKatex(options, renderer) {
const match = src.match(ruleReg); const match = src.match(ruleReg);
if (match) { if (match) {
console.log(match)
const text = match.slice(2).filter((item) => item).find((item) => item.trim()); const text = match.slice(2).filter((item) => item).find((item) => item.trim());
return { return {
...@@ -115,11 +114,14 @@ function blockKatex(options, renderer) { ...@@ -115,11 +114,14 @@ function blockKatex(options, renderer) {
level: 'block', level: 'block',
tokenizer(src, tokens) { tokenizer(src, tokens) {
const match = src.match(blockRule); const match = src.match(blockRule);
if (match) { if (match) {
const text = match.slice(2).filter((item) => item).find((item) => item.trim());
return { return {
type: 'blockKatex', type: 'blockKatex',
raw: match[0], raw: match[0],
text: match[0], text: text,
}; };
} }
}, },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment