Skip to content

Commit

Permalink
fix(rfc): recursively hoist children nodes in Hoist Node
Browse files Browse the repository at this point in the history
  • Loading branch information
jsamr committed Nov 1, 2020
1 parent 55ca29f commit 1ecc30b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rfc/002-CSS-whitespace-collapsing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ifdef::env-github[]
:warning-caption: :warning:
endif::[]
:author: Jules Sam. Randolph
:revnumber: 1.0.0-draft.9
:revnumber: 1.0.0-draft.10
:toc: left

= CSS Whitespace Collapsing
Expand Down Expand Up @@ -332,6 +332,7 @@ when _tnode_ is a <<tphrasinganchor>> node, the algorithm will group text with

Given _tnode_ a <<tnode>>:

. *Set* _tnode.children_ to the mapping of <<hoist-node>>
. *If* _tnode_ is a <<tphrasing>> node
.. *For each* _cnode_ from _tnode.children_
... *If* _cnode_ is a <<tblock>> node
Expand All @@ -357,7 +358,9 @@ Given _tnode_ a <<tnode>>:
Given _tnode_ a <<tblock>> and _wrappernode_ a <<tphrasing>> node:

. *Let* _newchildren_ be an empty list of <<tnode,TNodes>>.
. *Let* _wrapper_ be a copy of _wrappernode_
. _(a marker copy is a new instance of the same class, in which only the attribute 'href' is
copied if present)_
. *Let* _wrapper_ be a marker copy of _wrappernode_
. *For each* _cnode_ of _tnode.children_
.. *Let* _newchild_ be the result of applying <<hoist-node>> to _cnode_
.. *If* _newchild_ is a <<ttext>> *or* _newchild_ is a <<tphrasing>>
Expand Down

0 comments on commit 1ecc30b

Please sign in to comment.