From 0d29257d86ce258479a8f5e2fb9331d2988a6214 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 20 May 2024 11:09:54 +0200 Subject: [PATCH] Fix starts_with/ends_with inversion on segment editor Fixes #292 --- lib/keila_web/live/segment_edit_live.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/keila_web/live/segment_edit_live.ex b/lib/keila_web/live/segment_edit_live.ex index 94a6c744..2ad50858 100644 --- a/lib/keila_web/live/segment_edit_live.ex +++ b/lib/keila_web/live/segment_edit_live.ex @@ -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