]> source.dussan.org Git - gitea.git/commit
Run processors on whole of text (#16155)
authorzeripath <art27@cantab.net>
Thu, 17 Jun 2021 10:35:05 +0000 (11:35 +0100)
committerGitHub <noreply@github.com>
Thu, 17 Jun 2021 10:35:05 +0000 (11:35 +0100)
commit0db1048c3ab0b0802779fd84b86c4335c37e54b3
tree642c73f6ec0647b3e2c71a76397401359ad77cdb
parent6ad5d0a3062966515730aa1f8d62db5d2a7704ee
Run processors on whole of text (#16155)

There is an inefficiency in the design of our processors which means that Emoji
and other processors run in order n^2 time.

This PR forces the processors to process the entirety of text node before passing
back up. The fundamental inefficiency remains but it should be significantly
ameliorated.

Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/emoji/emoji.go
modules/markup/html.go
modules/markup/html_test.go