Created
January 11, 2011 05:33
-
-
Save huacnlee/774066 to your computer and use it in GitHub Desktop.
去除区域里面的HTML内容的换行和空白标记
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 去除区域里面的HTML内容的换行和空白标记 | |
def spaceless(&block) | |
data = with_output_buffer(&block) | |
data = data.gsub(/>\s+</,"><") | |
data | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment