mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-22 14:05:13 +00:00
implement syntax: mathBlock
This commit is contained in:
parent
753cb6deff
commit
2160b6147b
1 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue