diff options
author | feld <feld@feld.me> | 2020-10-29 19:39:23 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2020-10-29 19:39:23 +0000 |
commit | 8b3650998bcadf8e96a356592d186f4c6a0ec9b5 (patch) | |
tree | 7b683329739ec78c93e1fd73762cc0b98af9d638 | |
parent | 0e0a6aef70fc0cac1f9176e4f50a7fe4930242fa (diff) | |
parent | 89c356d19fde3349a741522e7940a281487d9b08 (diff) | |
download | pleroma-8b3650998bcadf8e96a356592d186f4c6a0ec9b5.tar.gz |
Merge branch 'fix/mrf-keyword-description' into 'develop'
Improve Keyword descriptions for AdminFE
See merge request pleroma/pleroma!3110
-rw-r--r-- | config/description.exs | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/config/description.exs b/config/description.exs index 0bfa9979f..798cbe2ad 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1757,28 +1757,37 @@ config :pleroma, :config_description, [ related_policy: "Pleroma.Web.ActivityPub.MRF.KeywordPolicy", label: "MRF Keyword", type: :group, - description: "Reject or Word-Replace messages with a keyword or regex", + description: + "Reject or Word-Replace messages matching a keyword or [Regex](https://hexdocs.pm/elixir/Regex.html).", children: [ %{ key: :reject, type: {:list, :string}, - description: - "A list of patterns which result in message being rejected. Each pattern can be a string or a regular expression.", + description: """ + A list of patterns which result in message being rejected. + + Each pattern can be a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`. + """, suggestions: ["foo", ~r/foo/iu] }, %{ key: :federated_timeline_removal, type: {:list, :string}, - description: - "A list of patterns which result in message being removed from federated timelines (a.k.a unlisted). Each pattern can be a string or a regular expression.", + description: """ + A list of patterns which result in message being removed from federated timelines (a.k.a unlisted). + + Each pattern can be a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`. + """, suggestions: ["foo", ~r/foo/iu] }, %{ key: :replace, type: {:list, :tuple}, - description: - "A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.", - suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}] + description: """ + **Pattern**: a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`. + + **Replacement**: a string. Leaving the field empty is permitted. + """ } ] }, |