more strict table rules, more flexible hr rules

This commit is contained in:
Guilhem Fauré 2023-05-09 10:51:01 +02:00
parent ca0e9af4b4
commit c9906c56cc
2 changed files with 9 additions and 5 deletions

View File

@ -8,7 +8,7 @@ start: _N* block ( _N+ block )* _N*
| _block_tag | _block_tag
| paragraph{TEXT} | paragraph{TEXT}
HORIZONTAL_RULE: /----+/ HORIZONTAL_RULE: /- *- *- *- *[\- ]*/
?list: unordered_list ?list: unordered_list
| ordered_list | ordered_list
@ -16,7 +16,7 @@ HORIZONTAL_RULE: /----+/
unordered_list: ( _UL list_item _N )+ unordered_list: ( _UL list_item _N )+
ordered_list: ( _OL list_item _N )+ ordered_list: ( _OL list_item _N )+
list_item: _inline{TEXT}+ list_item: _inline{TEXT}+
_UL: /-\*|-[^#-]/ _UL: /-\*|-(?!#|---)/
_OL: /-#/ _OL: /-#/
table: ( _TBL_META table_metadata "||" _N )? ( table_row _N )+ table: ( _TBL_META table_metadata "||" _N )? ( table_row _N )+
@ -25,8 +25,8 @@ table_title: _inline{TABLE_TEXT}
table_description: _inline{TABLE_TEXT} table_description: _inline{TABLE_TEXT}
table_row: ( _TBL table_cell )+ "|" table_row: ( _TBL table_cell )+ "|"
table_cell: _inline{TABLE_TEXT} table_cell: _inline{TABLE_TEXT}
_TBL_META: "||" _TBL_META: /\|\|(?=[^\r\n]+\|\|)/
_TBL: "|" _TBL: /\|(?=[^\r\n]+\|)/
heading: _H _inline{MARKED_TEXT}+ "}}}" heading: _H _inline{MARKED_TEXT}+ "}}}"
_H: "{{{" _H: "{{{"
@ -83,7 +83,7 @@ PARAGRAPH_TEXT: / [^\r\n|\-{<]
|\[[^\[\r\n]*\]\] |\[[^\[\r\n]*\]\]
))* ))*
| (?:\<(?![0-9A-Za-z_:|,=\/\-\. ]+\>))+ | (?:\<(?![0-9A-Za-z_:|,=\/\-\. ]+\>))+
| \\{ | \|(?=[^\r\n|])
/x /x
TEXT: / (?:[^\r\n{<](?! TEXT: / (?:[^\r\n{<](?!

View File

@ -24,6 +24,10 @@ Un lien [lark->https://lark-parser.readthedocs.io] dans un paragraphe.
{{2003-2004:}} Post-Doc, University of Waterloo, Canada (T. B. McMahon's group) {{2003-2004:}} Post-Doc, University of Waterloo, Canada (T. B. McMahon's group)
{{2000-2002: }} PhD, LCP Univ. Paris XI (supervision : P. Maître) {{2000-2002: }} PhD, LCP Univ. Paris XI (supervision : P. Maître)
| not
| a
| table
---- --- ---- ---
{{{Research Interests}}} {{{Research Interests}}}