Compare commits

...

2 Commits

Author SHA1 Message Date
2b25c13095 Fix bug which omits element's attributes
There is a questionable design decision: for
getting the attributes from the %InternalNode{} into
the rendered html output they always have to be copied
into node.eph.attributes. (OutlookWeb.HtmlDocComponent.dnode())
2023-05-28 15:31:08 +02:00
357bcae450 Add ’ to partitioning regex 2023-05-28 15:23:25 +02:00
2 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@ defmodule Outlook.InternalTree do
def render_public_content(tree, translation, language) do def render_public_content(tree, translation, language) do
Translation.render_translation(tree, translation) Translation.render_translation(tree, translation)
|> garnish(%{})
|> Html.render_doc() |> Html.render_doc()
|> Hyphenation.hyphenate(language) |> Hyphenation.hyphenate(language)
end end

View File

@ -18,7 +18,7 @@ defmodule Outlook.InternalTree.RawInternalBasic do
|> String.replace(~r/\.\.\.+/u, "") |> String.replace(~r/\.\.\.+/u, "")
|> String.replace(~r/([[:upper:]])\./u, "\\1#{@nonperiodmarker}") |> String.replace(~r/([[:upper:]])\./u, "\\1#{@nonperiodmarker}")
|> String.replace(~r/(\d)\.(\d)/u, "\\1#{@nonperiodmarker}\\2") |> String.replace(~r/(\d)\.(\d)/u, "\\1#{@nonperiodmarker}\\2")
|> String.replace(~r|([.?!]["'”]?\s*)|u, "\\1#{@splitmarker}") |> String.replace(~r|([.?!]["'”]?\s*)|u, "\\1#{@splitmarker}")
|> String.replace(@nonperiodmarker, ".") |> String.replace(@nonperiodmarker, ".")
} | set_split_markers(rest) ] } | set_split_markers(rest) ]
end end