Add rest of other commit (appr. HEAD~20?)
This commit is contained in:
@ -58,4 +58,19 @@ defmodule Outlook.InternalTree.InternalTree do
|
|||||||
|> Enum.into(node_atts)
|
|> Enum.into(node_atts)
|
||||||
%{node | eph: Map.put(node.eph, :attributes, attributes)}
|
%{node | eph: Map.put(node.eph, :attributes, attributes)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def collect_tunit_ids([%TranslationUnit{} = node | rest]) do
|
||||||
|
[node.nid | collect_tunit_ids(rest)]
|
||||||
|
end
|
||||||
|
|
||||||
|
def collect_tunit_ids([%{type: :element} = node | rest]) do
|
||||||
|
collect_tunit_ids(node.content) ++ collect_tunit_ids(rest)
|
||||||
|
end
|
||||||
|
|
||||||
|
def collect_tunit_ids([node | rest]) do
|
||||||
|
collect_tunit_ids(rest)
|
||||||
|
end
|
||||||
|
|
||||||
|
def collect_tunit_ids([]), do: []
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user