From 437c6a4b7ef115208ae84a938f989b92fb282c39 Mon Sep 17 00:00:00 2001 From: Rocknest <35231115+Rocknest@users.noreply.github.com> Date: Tue, 7 Jan 2020 22:26:21 +0200 Subject: [PATCH] Make markdown parser more safe (#4105) Fixes #3722 --- lib/std/special/docs/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/special/docs/main.js b/lib/std/special/docs/main.js index 2fa6ccd1f2..138f79887d 100644 --- a/lib/std/special/docs/main.js +++ b/lib/std/special/docs/main.js @@ -1432,7 +1432,7 @@ line.type = "ul"; line.text = line.text.substr(1); } - else if (line.text.match(/\d+\./)) { + else if (line.text.match(/^\d+\..*$/)) { // if line starts with {number}{dot} const match = line.text.match(/(\d+)\./); line.type = "ul"; line.text = line.text.substr(match[0].length);