User:Proteins/unindent.js: Difference between revisions

Content deleted Content added
Proteins (talk | contribs)
refine regular expression to eliminate internal DL elements
Proteins (talk | contribs)
don't remove other HTML tags
Line 58:
//Alternative approach: skip all DD elements that have a sub DL element within
untagged_text = temp_DD_element.innerHTML.replace(/<dl>.*<\/dl>/ig, ""); // remove inner DL's
// untagged_text = untagged_text.replace(/(<([^>]+)>)/ig,""); // remove other HTML tags
unspaced_text = untagged_text.replace(/\s/ig, ""); // remove whitespaces
byte_count = unspaced_text.length; // remove whitespaces