Skip to content

Commit

Permalink
Fix starts_with/ends_with inversion on segment editor
Browse files Browse the repository at this point in the history
Fixes #292
  • Loading branch information
wmnnd committed May 20, 2024
1 parent c81d1fc commit 0d29257
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/keila_web/live/segment_edit_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@ defmodule KeilaWeb.SegmentEditLive do
%{"value" => String.slice(value, 1..-2), "widget" => "includes"}

String.starts_with?(value, "%") ->
%{"value" => String.slice(value, 1..-1), "widget" => "starts_with"}
%{"value" => String.slice(value, 1..-1), "widget" => "ends_with"}

String.ends_with?(value, "%") ->
%{"value" => String.slice(value, 0..-2), "widget" => "ends_with"}
%{"value" => String.slice(value, 0..-2), "widget" => "starts_with"}
end
end

Expand Down

0 comments on commit 0d29257

Please sign in to comment.