diff options
| author | Rocknest <35231115+Rocknest@users.noreply.github.com> | 2020-01-07 22:26:21 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-01-07 15:26:21 -0500 |
| commit | 437c6a4b7ef115208ae84a938f989b92fb282c39 (patch) | |
| tree | 388336bcde4bab38ce90eb46545512e513abe899 /lib/std/special | |
| parent | 3607d9ee6821f524e2866f8ca44a5d577495d762 (diff) | |
| download | zig-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.js | 2 |
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); |
