Exploring Graphs with Elixir: case clause for already sliced graph.data string p25

The logic to determine if an ellipsis is shown will always evaluate to false because the variable str is already sliced and has a length equal to @slice

My 2p

  data =
    case String.length(str) < @slice do
      true ->
        @quote <> str <> @quote

      false ->
        str
        |> String.slice(0, @slice)
        |> (&(@quote <> &1 <> "..." <> @quote)).()
    end