File tree Expand file tree Collapse file tree 2 files changed +21
-19
lines changed Expand file tree Collapse file tree 2 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,16 @@ export default {
93
93
nestedString += ` <${ child} />\n `
94
94
}
95
95
else {
96
- nestedString += htmlElementMap[child .text ][0 ]
97
- nestedString += ' \n ' ;
98
- nestedString += writeNested (child .children ,indented)
99
- nestedString += indented + htmlElementMap[child .text ][1 ]
100
- nestedString += ' \n '
96
+ if (child .children .length ){
97
+ nestedString += htmlElementMap[child .text ][0 ]
98
+ nestedString += ' \n ' ;
99
+ nestedString += writeNested (child .children ,indented)
100
+ nestedString += indented + htmlElementMap[child .text ][1 ]
101
+ nestedString += ' \n '
102
+ }
103
+ else {
104
+ nestedString += htmlElementMap[child .text ][0 ]+ htmlElementMap[child .text ][1 ]+ ' \n ' ;
105
+ }
101
106
}
102
107
})
103
108
return nestedString
@@ -114,12 +119,17 @@ export default {
114
119
}
115
120
else {
116
121
outputStr += ` ` ;
117
- outputStr += htmlElementMap[el .text ][0 ];
118
- outputStr += ' \n '
119
- outputStr += writeNested (el .children ,` ` )
120
- outputStr += ` `
121
- outputStr += htmlElementMap[el .text ][1 ];
122
- outputStr += ` \n ` ;
122
+ if (el .children .length ){
123
+ outputStr += htmlElementMap[el .text ][0 ];
124
+ outputStr += ' \n '
125
+ outputStr += writeNested (el .children ,` ` )
126
+ outputStr += ` `
127
+ outputStr += htmlElementMap[el .text ][1 ];
128
+ outputStr += ` \n ` ;
129
+ }
130
+ else {
131
+ outputStr += htmlElementMap[el .text ][0 ]+ htmlElementMap[el .text ][1 ]+ ' \n ' ;
132
+ }
123
133
}
124
134
}
125
135
// console.log(`outputStr from writeTemplateTag: ${outputStr}`)
Original file line number Diff line number Diff line change @@ -138,19 +138,11 @@ export default {
138
138
// console.log('component parent',component.parent)
139
139
// console.log('component parent parent', component.parent.parent)
140
140
if (! Object .keys (component .parent ).length ) return lineage;
141
- <<<<<< < HEAD
142
141
for (var parents in component .parent ) {
143
142
// for each parent in our component
144
143
// console.log('parents', parents)
145
144
lineage .push (parents); // push the parent into lineage
146
145
// console.log('lineage pre push', component, lineage)
147
- ====== =
148
- for (var parents in component .parent ) {
149
- // for each parent in our component
150
- console .log (' parents' , parents)
151
- lineage .push (parents); // push the parent into lineage
152
- console .log (' lineage pre push' , component, lineage)
153
- >>>>>> > c3465a8ee7303f95f469f78b7ab5d89214b77193
154
146
checkParents (component .parent [parents], lineage);
155
147
// console.log('lineage post recursive call', lineage)
156
148
}
You can’t perform that action at this time.
0 commit comments