Content deleted Content added
remove diagnostic messages |
refine the conditional to eliminate DD elements used only for formatting |
||
Line 52:
if (!num_child_nodes) { continue; } // ignore empty DD elements
//Alternative approach: skip all DD elements that have a sub DL element within
untagged_text = temp_DD_element.innerHTML.replace(/(<dl([^>]
untagged_text = untagged_text.replace(/(<([^>]+)>)/ig,""); // remove other HTML tags
byte_count = untagged_text.replace(/\s/ig, "").length; // remove whitespaces
Line 96 ⟶ 97:
temp_DD_element.appendChild(document.createTextNode(indent_level_string));
}
temp_DD_element.normalize();
diagnostic_string += "DD element " + DD_element_index + " is indented to level " + indent_level + ".\n";
} // check for unindenting
|