From ecad69f94750b16d201f025a87c3635ce41b417e Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 25 Dec 2021 07:54:05 +0200 Subject: GmDocument: Detect an invalid link IssueID #427 --- src/gmdocument.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gmdocument.c') diff --git a/src/gmdocument.c b/src/gmdocument.c index 884f8c07..9d79830b 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c @@ -236,7 +236,12 @@ enum iGmLineType lineType_Rangecc(const iRangecc line) { return text_GmLineType; } if (startsWith_Rangecc(line, "=>")) { - return link_GmLineType; + iRangecc trim = line; + trim_Rangecc(&trim); + if (size_Range(&trim) > 2) { + return link_GmLineType; + } + return text_GmLineType; } if (startsWith_Rangecc(line, "###")) { return heading3_GmLineType; -- cgit v1.2.3