From 8fca926461b267a9937523c21e78bd9d52a61607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilhem=20Faur=C3=A9?= Date: Tue, 9 May 2023 09:29:10 +0200 Subject: [PATCH] remove priorities --- spip2md/spip.lark | 18 +++++++++--------- test/0.spip | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spip2md/spip.lark b/spip2md/spip.lark index c316993..5367f8d 100644 --- a/spip2md/spip.lark +++ b/spip2md/spip.lark @@ -19,19 +19,19 @@ list_item: _inline{TEXT}+ _UL: /-\*|-[^#-]/ _OL: /-#/ -table.1: ( _TBL_META table_metadata "||" _N )? ( table_row _N )+ +table: ( _TBL_META table_metadata "||" _N )? ( table_row _N )+ table_metadata: table_title "|" table_description table_title: _inline{TABLE_TEXT} table_description: _inline{TABLE_TEXT} table_row: ( _TBL table_cell )+ "|" table_cell: _inline{TABLE_TEXT} -_TBL_META.1: "||" -_TBL.1: "|" +_TBL_META: "||" +_TBL: "|" heading: _H _inline{MARKED_TEXT}+ "}}}" _H: "{{{" -_block_tag.1: pair_block_tag +_block_tag: pair_block_tag | orphan_block_tag pair_block_tag: _PAIR_TAG_ANGLE TAG_NAME ( _OPTION_SEP TAG_OPTION )* ">" start "" -> tag @@ -48,13 +48,13 @@ _inline{text}: _inline_tag | strong | text -_inline_tag.1: pair_inline_tag +_inline_tag: pair_inline_tag | orphan_inline_tag pair_inline_tag: _PAIR_INLINE_TAG_ANGLE TAG_NAME ( _OPTION_SEP TAG_OPTION )* ">" _N? paragraph{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 +_PAIR_INLINE_TAG_ANGLE: /<(?!img|emb|doc)(?=[0-9A-Za-z_:,=\/\.\|\- ]*>)/i _INLINE_TAG_ANGLE: /<\/?(?=(?:img|emb|doc)[0-9A-Za-z\|_:,=\/\.\|\- ]+>)/i _link: footnote @@ -76,7 +76,7 @@ emphasis: _I ( _inline{MARKED_TEXT} )+ ( "}" | _N ) _B: /{{(?=[^\{])/ _I: /{(?=[^\{])/ -TEXT.-1: / (?:[^\r\n\{\<](?! +TEXT: / (?:[^\r\n{<](?! [^\[\n\r]*-> |\?[^\[\n\r]*\] |\[[^\[\n\r]*\]\] @@ -84,8 +84,8 @@ TEXT.-1: / (?:[^\r\n\{\<](?! | (?:\<(?![0-9A-Za-z_:|,=\/\-\. ]+\>))+ | \\{ /x -TABLE_TEXT.-1: /(?:[^\|\r\n\{](?![^\[\n\r]*->))+/ -MARKED_TEXT.-1: /(?:[^\}\r\n\{](?![^\[\n\r]*->))+/ +TABLE_TEXT: /(?:[^\|\r\n\{](?![^\[\n\r]*->))+/ +MARKED_TEXT: /(?:[^\}\r\n\{](?![^\[\n\r]*->))+/ TAG_NAME: _PURE_TEXT TAG_OPTION: _PURE_TEXT diff --git a/test/0.spip b/test/0.spip index 5f590c4..e7151f0 100644 --- a/test/0.spip +++ b/test/0.spip @@ -38,7 +38,7 @@ Conclut par un {{ {Lorem ipsum} }} dolor sit amet, officia excepteur ex fugiat r Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est accolade impromptue } proident. Du def pythonCode(): pass code python. Nostrud officia {{pariatur}} ut officia. Sit [un lien->https://google.com]irure elit esse lien [?wikipedia] ea nulla sunt ex occaecat texte biffé on dit barré non ? Reprehenderit commodo footnote[[content of footnote]] officia dolor Lorem duis laboris cupidatat officia voluptate. -Culpa proident adipisicing id {nulla} nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non [excepteur] duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis. +Culpa proident adipisicing id {nulla} nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non [excepteur] duis unexpected pipe | sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis. ----