We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70ee357 commit 622bff3Copy full SHA for 622bff3
lib/elixir/lib/regex.ex
@@ -476,13 +476,12 @@ defmodule Regex do
476
end
477
478
479
- disabled = List.to_string([?i, ?m, ?s, ?x] -- modifiers)
+ disabled = [?i, ?m, ?s, ?x] -- modifiers
480
481
- disabled = if disabled != "", do: "-#{disabled}", else: ""
+ disabled = if disabled != [], do: "-#{disabled}", else: ""
482
483
- modifiers =
484
- Enum.sort(modifiers)
485
- |> List.to_string()
+ # Future proof option ordering consistency by sorting
+ modifiers = Enum.sort(modifiers)
486
487
nl = if Enum.member?(regex_opts, :extended), do: "\n", else: ""
488
0 commit comments