autocomplete: fix completion of ai: metatag.

Fix it so we don't show the `ai:` prefix in front of results in the
autocomplete menu when completing the `ai: metatag.
This commit is contained in:
evazion
2022-09-03 20:26:00 -05:00
parent f83af31a00
commit 4a77d67d1f
2 changed files with 8 additions and 6 deletions

View File

@@ -256,7 +256,7 @@ class Tag < ApplicationRecord
def split_words(name)
return [name] if !parsable_into_words?(name)
name.split(WORD_DELIMITER_REGEX).compact_blank
name.split(WORD_DELIMITER_REGEX).reject(&:empty?)
end
# Parse the tag into plain words, removing punctuation and delimiters.