parametric paragraph

This commit is contained in:
Guilhem Fauré 2023-05-09 09:28:29 +02:00
parent 07e1855a70
commit 7d99e59c3d

View File

@ -6,7 +6,7 @@ start: _N* block ( _N+ block )* _N*
| list
| table
| _block_tag
| paragraph
| paragraph{TEXT}
HORIZONTAL_RULE: /----+/
@ -40,7 +40,7 @@ orphan_block_tag: _ORPHAN_TAG_ANGLE "/"? TAG_NAME ( _OPTION_SEP TAG_OPTION )* ">
_PAIR_TAG_ANGLE: /<(?=([0-9A-Za-z_:|,=\/\-\. ]+)>\r?\n[\s\S]+<\/\1>)/
_ORPHAN_TAG_ANGLE: /<(?=([0-9A-Za-z_:|,=\/\-\. ])+>\r?\n)(?![\s\S]+\<\/\1\>)/
paragraph.-1: ( _inline{TEXT} _N? )+
paragraph{text}.-1: ( _inline{text} _N? )+
_inline{text}: _inline_tag
| _link
@ -51,7 +51,7 @@ _inline{text}: _inline_tag
_inline_tag.1: pair_inline_tag
| orphan_inline_tag
pair_inline_tag: _PAIR_INLINE_TAG_ANGLE TAG_NAME ( _OPTION_SEP TAG_OPTION )* ">" _N? paragraph ( "</" _PURE_TEXT ">" | _N ) -> tag
pair_inline_tag: _PAIR_INLINE_TAG_ANGLE TAG_NAME ( _OPTION_SEP TAG_OPTION )* ">" _N? paragraph{TEXT} ( "</" _PURE_TEXT ">" | _N ) -> tag
orphan_inline_tag: _INLINE_TAG_ANGLE TAG_NAME ( _OPTION_SEP TAG_OPTION )* ">" -> orphan_tag
_PAIR_INLINE_TAG_ANGLE.1: /<(?!img|emb|doc)(?=[0-9A-Za-z_:,=\/\.\|\- ]*>)/i