don’t use inner text as text is now more strict anyway
This commit is contained in:
parent
87e9a2257e
commit
cb36324e9a
@ -19,7 +19,7 @@ table: ( row _N )+ -> table
|
|||||||
row: ( _PIPE cell )+ _PIPE -> tr
|
row: ( _PIPE cell )+ _PIPE -> tr
|
||||||
cell: _inline_format -> td
|
cell: _inline_format -> td
|
||||||
|
|
||||||
heading: _O_CURLY_3 ( INNER_TEXT | link | nested_italic | nested_bold ) _C_CURLY_3 -> h2
|
heading: _O_CURLY_3 ( TEXT | link | nested_italic | nested_bold ) _C_CURLY_3 -> h2
|
||||||
|
|
||||||
paragraph: ( _inline_format _N? )+ -> p
|
paragraph: ( _inline_format _N? )+ -> p
|
||||||
|
|
||||||
@ -28,10 +28,10 @@ _inline_format: TEXT
|
|||||||
| bold
|
| bold
|
||||||
| link
|
| link
|
||||||
|
|
||||||
bold: _O_CURLY_2 ( INNER_TEXT | link | nested_italic )+ _C_CURLY_2 -> strong
|
bold: _O_CURLY_2 ( TEXT | link | nested_italic )+ _C_CURLY_2 -> strong
|
||||||
italic: _O_CURLY ( INNER_TEXT | link | nested_bold )+ _C_CURLY -> em
|
italic: _O_CURLY ( TEXT | link | nested_bold )+ _C_CURLY -> em
|
||||||
nested_bold: TEXT+ _O_CURLY_2 ( INNER_TEXT | link )+ _C_CURLY_2 -> strong
|
nested_bold: TEXT+ _O_CURLY_2 ( TEXT | link )+ _C_CURLY_2 -> strong
|
||||||
nested_italic: TEXT+ _O_CURLY ( INNER_TEXT | link )+ _C_CURLY -> em
|
nested_italic: TEXT+ _O_CURLY ( TEXT | link )+ _C_CURLY -> em
|
||||||
|
|
||||||
?link: footnote
|
?link: footnote
|
||||||
| wikipedia_link
|
| wikipedia_link
|
||||||
@ -72,22 +72,25 @@ SEPARATOR: "----" "-"*
|
|||||||
|
|
||||||
/// Text
|
/// Text
|
||||||
// - Don’t contains line breaks
|
// - Don’t contains line breaks
|
||||||
// - Don’t contains any opening markup elements…
|
// - Don’t contains any markup element…
|
||||||
// - EXCEPTED when they are used as in regular text
|
// - EXCEPTED when they are used as in regular text
|
||||||
TEXT: /[^\r\n\{\[\<]+/
|
TEXT: /[^\r\n\{\}\[\]\<\>]+/
|
||||||
| /\[(?!.*->.*\])/
|
| /\[(?!.*->.*\])/
|
||||||
|
| /\]/
|
||||||
|
|
||||||
/// Inner text :
|
/// Inner text :
|
||||||
// - Don’t contains line breaks
|
// - Don’t contains line breaks
|
||||||
// - Don’t contains markup closing right curly braces
|
// - Don’t contains markup closing right curly braces
|
||||||
INNER_TEXT: /[^\r\n\}]+/
|
// INNER_TEXT: /[^\r\n\}]+/
|
||||||
|
|
||||||
/// Link href :
|
/// Link href :
|
||||||
// - Don’t contains line breaks
|
// - Don’t contains line breaks
|
||||||
// - Don’t contains markup closing right square brackets
|
// - Don’t contains markup closing right square brackets
|
||||||
HREF: /[^\r\n\]]+/
|
// HREF: /[^\r\n\]]+/
|
||||||
|
HREF: TEXT
|
||||||
|
|
||||||
/// Link text :
|
/// Link text :
|
||||||
// - Don’t contains line breaks
|
// - Don’t contains line breaks
|
||||||
|
// - Don’t contains an opening or closing square bracket
|
||||||
// - Don’t contains an hyphen angle bracket arrow ( -> )
|
// - Don’t contains an hyphen angle bracket arrow ( -> )
|
||||||
LINK_TEXT: /[^\r\n\[\]]+(?=->)/
|
LINK_TEXT: /[^\r\n\[\]]+(?=->)/
|
||||||
|
Loading…
Reference in New Issue
Block a user