From b14137c1fd87fb37812a31100877af13466203ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilhem=20Faur=C3=A9?= Date: Tue, 9 May 2023 10:15:53 +0200 Subject: [PATCH] fix closing inline tags --- spip2md/spip.lark | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spip2md/spip.lark b/spip2md/spip.lark index 5367f8d..dde78c1 100644 --- a/spip2md/spip.lark +++ b/spip2md/spip.lark @@ -49,12 +49,12 @@ _inline{text}: _inline_tag | text _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} ( "" | _N ) -> 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 _INLINE_TAG_ANGLE: /<\/?(?=(?:img|emb|doc)[0-9A-Za-z\|_:,=\/\.\|\- ]+>)/i _link: footnote @@ -77,13 +77,13 @@ _B: /{{(?=[^\{])/ _I: /{(?=[^\{])/ TEXT: / (?:[^\r\n{<](?! - [^\[\n\r]*-> - |\?[^\[\n\r]*\] - |\[[^\[\n\r]*\]\] - ))+ - | (?:\<(?![0-9A-Za-z_:|,=\/\-\. ]+\>))+ - | \\{ - /x + [^\[\n\r]*-> + |\?[^\[\n\r]*\] + |\[[^\[\n\r]*\]\] + ))+ + | (?:\<(?![0-9A-Za-z_:|,=\/\-\. ]+\>))+ + | \\{ + /x TABLE_TEXT: /(?:[^\|\r\n\{](?![^\[\n\r]*->))+/ MARKED_TEXT: /(?:[^\}\r\n\{](?![^\[\n\r]*->))+/ TAG_NAME: _PURE_TEXT