From db5b94028d0b7ed669667e17819f125f5165b777 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Fri, 13 Oct 2023 11:57:12 -0400 Subject: [PATCH] chore: remove unused alias --- lib/ash_hq_web/components/search.ex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/ash_hq_web/components/search.ex b/lib/ash_hq_web/components/search.ex index 58a588f..e57b4d2 100644 --- a/lib/ash_hq_web/components/search.ex +++ b/lib/ash_hq_web/components/search.ex @@ -7,7 +7,6 @@ defmodule AshHqWeb.Components.Search do alias AshHqWeb.Components.Icon alias AshHqWeb.DocRoutes alias Surface.Components.{Form, LivePatch} - alias Surface.Components.Form.Checkbox prop(close, :event, required: true) prop(libraries, :list, required: true) @@ -159,10 +158,14 @@ defmodule AshHqWeb.Components.Search do first_sentence = doc |> String.trim() - |> String.split("", parts: 2) + |> String.split("", parts: 2, trim: true) |> List.last() |> String.trim() - |> String.split("\n", parts: 2) + |> String.split("\n", parts: 3, trim: true) + |> case do + ["#" <> _ | rest] -> rest + other -> other + end |> Enum.at(0) |> String.trim()