Add hyphenation and a generalized render_public_content function

This commit is contained in:
Thelonius Kort
2023-01-26 21:48:50 +01:00
parent e8e7f877e7
commit 38b3f0c272
3 changed files with 53 additions and 4 deletions

View File

@ -197,8 +197,12 @@ defmodule OutlookWeb.TranslationLive.FormComponent do
defp publish(translation_params, %{"publish" => "true"}, socket) do
translation_params
|> Map.put("public_content",
InternalTree.render_translation(socket.assigns.translation.article.content, translation_params["content"])
|> Html.render_doc())
InternalTree.render_public_content(
socket.assigns.translation.article.content,
socket.assigns.translation_content,
socket.assigns.translation.language
)
)
end
defp publish(translation_params, %{"publish" => "false"}, _) do
translation_params