implement syntax: mathBlock

This commit is contained in:
marihachi 2020-02-24 22:55:59 +09:00
parent 753cb6deff
commit 2160b6147b

View file

@ -24,7 +24,7 @@ block
/ quote
/ search
/ blockCode
// / mathBlock
/ mathBlock
/ center
inline
@ -114,6 +114,17 @@ blockCode_line
= !("```" ENDLINE) line:$(CHAR+) NEWLINE { return line; }
// block: mathBlock
mathBlock
= BEGINLINE "\\[" content:$(!"\\]" c:. { return c; })+ "\\]" ENDLINE
{
return createTree('mathBlock', {
formula: content.trim()
});
}
// block: center
center