autocomplete: display autocorrected tags like aliases.
Display autocorrected tags similar to aliases, with an arrow pointing at the corrected tag, but with a dotted underline beneath the misspelled tag to indicate that it's misspelled.
This commit is contained in:
@@ -103,7 +103,7 @@ class AutocompleteService
|
||||
tags = Tag.nonempty.autocorrect_matches(string).limit(limit)
|
||||
|
||||
tags.map do |tag|
|
||||
{ type: "tag", label: tag.pretty_name, value: tag.name, category: tag.category, post_count: tag.post_count }
|
||||
{ type: "tag_autocorrect", label: tag.pretty_name, value: tag.name, category: tag.category, post_count: tag.post_count, antecedent: string }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user