Skip to content
Snippets Groups Projects
Commit 533a4b33 authored by marihachi's avatar marihachi
Browse files

implement syntax: center, jump, flip

parent 85d94231
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,8 @@ block ...@@ -24,6 +24,8 @@ block
/ quote / quote
/ search / search
/ blockCode / blockCode
// / mathBlock
/ center
inline inline
= big = big
...@@ -32,6 +34,16 @@ inline ...@@ -32,6 +34,16 @@ inline
/ italic / italic
/ strike / strike
/ motion / motion
// / spin
/ jump
/ flip
// / inlineCode
// / mathInline
// / mention
// / hashtag
// / url
// / link
// / emoji
/ text / text
text text
...@@ -102,6 +114,15 @@ blockCode_line ...@@ -102,6 +114,15 @@ blockCode_line
= !("```" ENDLINE) line:$(CHAR+) NEWLINE { return 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 // inline: big
big big
...@@ -192,6 +213,24 @@ motionB ...@@ -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 // Core rules
CHAR CHAR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment