]> cat aescling's git repositories - mastodon.git/commit
Fix inefficiencies in auto-linking code (#16506)
authorClaire <claire.github-309c@sitedethib.com>
Thu, 15 Jul 2021 13:56:58 +0000 (15:56 +0200)
committerGitHub <noreply@github.com>
Thu, 15 Jul 2021 13:56:58 +0000 (15:56 +0200)
commit211d5c3c300b5a54b60c7b0142158144f9b0d392
treecc2232be6461db04a473a5765b3ec4f826be6d47
parent3dcf3f2a3a059191668c4edf395e4ad0b19209c5
Fix inefficiencies in auto-linking code (#16506)

The auto-linking code basically rewrote the whole string escaping non-ascii
characters in an inefficient way, and building a full character offset map
between the unescaped and escaped texts before sending the contents to
TwitterText's extractor.

Instead of doing that, this commit changes the TwitterText regexps to include
valid IRI characters in addition to valid URI characters.
app/lib/formatter.rb
config/initializers/twitter_regex.rb