Add :eph field to %TranslationUnit{} and remove :sibling_with
Using :eph from now on to store ephemeral data like :sibling_with. Additionally added cleaning up :eph before saving to db. And renamed InternalTree.Basic to InternalTree.RawInternalBasic to make clear that it contains function for an intermediary tree structure.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
defmodule Outlook.InternalTree do
|
||||
|
||||
alias Outlook.InternalTree.{Html,Modifiers,Basic}
|
||||
alias Outlook.InternalTree.{Html,Modifiers,RawInternalBasic}
|
||||
alias Outlook.HtmlPreparations.HtmlPreparation
|
||||
|
||||
def render_html(tree) do
|
||||
@ -11,7 +11,6 @@ defmodule Outlook.InternalTree do
|
||||
|
||||
def render_html_preview(tree) do
|
||||
tree
|
||||
|> partition_text
|
||||
|> Html.to_html_preview("1")
|
||||
end
|
||||
|
||||
@ -24,7 +23,7 @@ defmodule Outlook.InternalTree do
|
||||
def partition_text(tree) do
|
||||
# validate_sibling_collocation(tree)
|
||||
tree
|
||||
|> Basic.set_split_markers()
|
||||
|> Basic.partition_textnodes()
|
||||
|> RawInternalBasic.set_split_markers()
|
||||
|> RawInternalBasic.partition_textnodes()
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user