From b96afeb39d1b252e8ac282cc172b6e1e469573ee Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Fri, 20 Nov 2020 16:45:27 +0300 Subject: [PATCH] Fix quadratic time on backticks This commit adds a cache `StateInline->backticks` which remembers positions for every possible backtick closer (`, ``, ```, etc.). Algorithm is similar to one described here: https://github.com/mity/md4c/commit/685b714453772ed250727f936847d5b5c5eed070 close https://github.com/markdown-it/markdown-it/issues/733 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 271622bda..5d72b2795 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - `[]()` is no longer a valid link. - Fix performance issues when parsing links, #732. +- Fix performance issues when parsing backticks, #733. ## [12.0.2] - 2020-10-23