Fix timelines in subway tooter.
This commit is contained in:
parent
47887ac848
commit
f1f79c0dca
3 changed files with 7 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ defmodule Pleroma.Formatter do
|
|||
def parse_tags(text, data \\ %{}) do
|
||||
Regex.scan(@tag_regex, text)
|
||||
|> Enum.map(fn (["#" <> tag = full_tag]) -> {full_tag, String.downcase(tag)} end)
|
||||
|> (fn map -> if data["sensitive"] in [true, "True", "true"], do: [{"#nsfw", "nsfw"}] ++ map, else: map end).()
|
||||
|> (fn map -> if data["sensitive"] in [true, "True", "true", "1"], do: [{"#nsfw", "nsfw"}] ++ map, else: map end).()
|
||||
end
|
||||
|
||||
def parse_mentions(text) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue