User:Proteins/unindent.js: Difference between revisions

Content deleted Content added
Proteins (talk | contribs)
undo radical change for now
Proteins (talk | contribs)
refine regular expression to eliminate internal DL elements
Line 57:
 
//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