Skip to content

Commit bb46f1b

Browse files
save file
1 parent 0c12ddc commit bb46f1b

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎utils/editors/html/code-explorer/v1.0/code-explorer-v1.0.html‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,16 +286,20 @@
286286
list.forEach(o=>{
287287

288288
var node = ui.html.cloneNode(true);
289+
289290
$(node,'.line').textContent = o.line;
290291
$(node,'.indent').style.width = (o.indent*3)+'px';
291292
$(node,'.name').textContent = o.name;
293+
292294
if(o.name.includes('-')){
293295
node.style.color = 'hsl(33,100%,30%)';
294296
}
297+
298+
var f=false;
295299
if(o.attrs.component){
296300
var regex = /\bv\d+(?:\.\d+)*(?!\s*=\s*)\b/;
297301
var v;
298-
for(var key in attr){
302+
for(var key in o.attrs){
299303

300304
if(regex.test(key)){
301305
v = key;
@@ -305,15 +309,19 @@
305309
}//for
306310
if(v){
307311
$(node,'.v').textContent = v;
308-
}else{
309-
$(node,'.v').remove();
312+
f = true;
310313
}
311314
}
315+
if(!f){
316+
$(node,'.v').remove();
317+
}
318+
312319
if(o.attrs.id){
313320
$(node,'.id').textContent = o.attrs.id;
314321
}else{
315322
$(node,'.id').remove();
316323
}
324+
317325
if(o.attrs.class){
318326
$(node,'.class').textContent = o.attrs.class;
319327
}else{

0 commit comments

Comments
 (0)