logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

utils.ex (480B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2023 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.ActivityPub.MRF.Utils do
  5. @spec describe_regex_or_string(String.t() | Regex.t()) :: String.t()
  6. def describe_regex_or_string(pattern) do
  7. # This horror is needed to convert regex sigils to strings
  8. if not is_binary(pattern) do
  9. inspect(pattern)
  10. else
  11. pattern
  12. end
  13. end
  14. end