Method: Stripper.xml_comments
- Defined in:
- lib/shed/stripper.rb
.xml_comments(str) ⇒ Object
Strips xml comments from the document.
10 11 12 13 14 |
# File 'lib/shed/stripper.rb', line 10 def xml_comments(str) str.gsub!(/<!--(?:.|([\r\n]))*?-->/,'') str.gsub(/<!--.*-->/,'') str end |