@@ -166,8 +166,6 @@ let processCounter = 0;
166166 * @return {Object } PostHTML tree
167167 */
168168function processTree ( options ) {
169- const filledSlots = { } ;
170-
171169 return ( tree , messages ) => {
172170 log ( `Processing tree number ${ processCounter } ..` , 'processTree' ) ;
173171
@@ -176,6 +174,8 @@ function processTree(options) {
176174 }
177175
178176 match . call ( tree , options . matcher , currentNode => {
177+ const filledSlots = { } ;
178+
179179 log ( `Match found for tag "${ currentNode . tag } "..` , 'processTree' ) ;
180180
181181 if ( ! currentNode . attrs ) {
@@ -229,14 +229,14 @@ function processTree(options) {
229229 return currentNode . content || nextNode . content ;
230230 } ) ;
231231
232+ // Process <slot> tags
233+ processSlotContent ( nextNode , filledSlots , options ) ;
234+
232235 nextNode = processTree ( options ) ( nextNode , messages ) ;
233236
234237 // Process <fill> tags
235238 processFillContent ( nextNode , filledSlots , options ) ;
236239
237- // Process <slot> tags
238- processSlotContent ( nextNode , filledSlots , options ) ;
239-
240240 // Remove component tag and replace content with <yield>
241241 currentNode . tag = false ;
242242 currentNode . content = content ;
0 commit comments