From 5552b3324b1f0503129f678d4495ad36e121f695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Thu, 22 Aug 2024 00:21:02 +0200 Subject: [PATCH] Handle `]` which not close link descriptions or references. --- org_rw/org_rw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index b8dccac..6cc4cef 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -1911,7 +1911,7 @@ def tokenize_contents(contents: str) -> List[TokenItems]: continue # Possible link close or open of description - if char == "]" and len(contents) > i + 1 and in_link: + if char == "]" and len(contents) > i + 1 and in_link and contents[i + 1] in "][": if contents[i + 1] == "]": cut_string()