FIX: Split link watched words from replace (#13196)

It was not clear that replace watched words can be used to replace text
with URLs. This introduces a new watched word type that makes it easier
to understand.
This commit is contained in:
Bianca Nenciu
2021-06-02 08:36:49 +03:00
committed by GitHub
parent eea9fead63
commit d9484db718
20 changed files with 186 additions and 62 deletions

View File

@ -29,7 +29,8 @@ class SiteSerializer < ApplicationSerializer
:censored_regexp,
:shared_drafts_category_id,
:custom_emoji_translation,
:watched_words_replace
:watched_words_replace,
:watched_words_link
)
has_many :categories, serializer: SiteCategorySerializer, embed: :objects
@ -185,6 +186,10 @@ class SiteSerializer < ApplicationSerializer
WordWatcher.word_matcher_regexps(:replace)
end
def watched_words_link
WordWatcher.word_matcher_regexps(:link)
end
private
def ordered_flags(flags)