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