diff --git a/src/parser/core-parser.pegjs b/src/parser/core-parser.pegjs index 3e1214905c1f24fe233f1cffbc5db6a13e01cec3..29b70612d8e770433422b62797df22320ef7c8f5 100644 --- a/src/parser/core-parser.pegjs +++ b/src/parser/core-parser.pegjs @@ -24,6 +24,8 @@ block / quote / search / blockCode + // / mathBlock + / center inline = big @@ -32,6 +34,16 @@ inline / italic / strike / motion + // / spin + / jump + / flip + // / inlineCode + // / mathInline + // / mention + // / hashtag + // / url + // / link + // / emoji / text text @@ -102,6 +114,15 @@ blockCode_line = !("```" ENDLINE) line:$(CHAR+) NEWLINE { return line; } +// block: center + +center + = BEGINLINE "<center>" content:(!"</center>" i:inline { return i; })+ "</center>" +{ + return createTree('center', { }, mergeText(content)); +} + + // inline: big big @@ -192,6 +213,24 @@ motionB } +// inline: jump + +jump + = "<jump>" content:(!"</jump>" i:inline { return i; })+ "</jump>" +{ + return createTree('jump', { }, mergeText(content)); +} + + +// inline: flip + +flip + = "<flip>" content:(!"</flip>" i:inline { return i; })+ "</flip>" +{ + return createTree('flip', { }, mergeText(content)); +} + + // Core rules CHAR