aboutsummaryrefslogtreecommitdiff
path: root/lib/std/special
diff options
context:
space:
mode:
authorRocknest <35231115+Rocknest@users.noreply.github.com>2020-01-07 22:26:21 +0200
committerAndrew Kelley <andrew@ziglang.org>2020-01-07 15:26:21 -0500
commit437c6a4b7ef115208ae84a938f989b92fb282c39 (patch)
tree388336bcde4bab38ce90eb46545512e513abe899 /lib/std/special
parent3607d9ee6821f524e2866f8ca44a5d577495d762 (diff)
downloadzig-437c6a4b7ef115208ae84a938f989b92fb282c39.tar.gz
zig-437c6a4b7ef115208ae84a938f989b92fb282c39.zip
Make markdown parser more safe (#4105)
Fixes #3722
Diffstat (limited to 'lib/std/special')
-rw-r--r--lib/std/special/docs/main.js2
1 files changed, 1 insertions, 1 deletions
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);