2 params paragraphs, paragraphs inside inline tags can start with block-specific startings

This commit is contained in:
Guilhem Fauré 2023-05-09 11:36:45 +02:00
parent f7357998c9
commit 079e156971

View File

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