fix descriptions possibly overflowing widths

This commit is contained in:
shibao 2024-12-30 19:18:15 -05:00
parent b72a79c380
commit b63c6bd318

View File

@ -168,14 +168,14 @@ defmodule MemexWeb.CoreComponents do
link( link(
link, link,
to: link, to: link,
class: "link inline", class: "link inline break-words",
target: "_blank", target: "_blank",
rel: "noopener noreferrer" rel: "noopener noreferrer"
) )
|> HTML.Safe.to_iodata() |> HTML.Safe.to_iodata()
|> IO.iodata_to_binary() |> IO.iodata_to_binary()
"</p>#{link}<p class=\"inline\">" "</p>#{link}<p class=\"inline break-words\">"
end end
) )
end end
@ -190,12 +190,12 @@ defmodule MemexWeb.CoreComponents do
link( link(
"[[[#{slug}]]]", "[[[#{slug}]]]",
to: ~p"/note/#{slug}", to: ~p"/note/#{slug}",
class: "link inline" class: "link inline break-words"
) )
|> HTML.Safe.to_iodata() |> HTML.Safe.to_iodata()
|> IO.iodata_to_binary() |> IO.iodata_to_binary()
"#{prefix}</p>#{link}<p class=\"inline\">#{suffix}" "#{prefix}</p>#{link}<p class=\"inline break-words\">#{suffix}"
end end
) )
end end
@ -217,12 +217,12 @@ defmodule MemexWeb.CoreComponents do
link( link(
"[[#{slug}]]", "[[#{slug}]]",
to: target, to: target,
class: "link inline" class: "link inline break-words"
) )
|> HTML.Safe.to_iodata() |> HTML.Safe.to_iodata()
|> IO.iodata_to_binary() |> IO.iodata_to_binary()
"#{prefix}</p>#{link}<p class=\"inline\">#{suffix}" "#{prefix}</p>#{link}<p class=\"inline break-words\">#{suffix}"
end end
) )
end end
@ -245,12 +245,12 @@ defmodule MemexWeb.CoreComponents do
link( link(
"[#{slug}]", "[#{slug}]",
to: target, to: target,
class: "link inline" class: "link inline break-words"
) )
|> HTML.Safe.to_iodata() |> HTML.Safe.to_iodata()
|> IO.iodata_to_binary() |> IO.iodata_to_binary()
"#{prefix}</p>#{link}<p class=\"inline\">#{suffix}" "#{prefix}</p>#{link}<p class=\"inline break-words\">#{suffix}"
end end
) )
end end