';
node.tabs.forEach(t => {
tabNames.add(t.name);
words += (t.content || '').replace(/<[^>]+>/g, ' ').split(/\s+/).filter(Boolean).length;
const has = t.content && t.content.replace(/<[^>]+>/g, '').trim();
const c = has ? t.content : '
هنوز چیزی نوشته نشده
';
h += `
${t.name}
${c}
`;
});
node.children.forEach((c, i) => { h += nodeHtml(c, depth + 1, num + '.' + (i + 1)); });
return h + '