lib/source2md/text_helper.rb in source2md-0.0.6 vs lib/source2md/text_helper.rb in source2md-0.0.7
- old
+ new
@@ -9,9 +9,17 @@
def add_newline_at_end_of_text(text)
text.strip + "\n"
end
def oneline(text)
- text.remove(/\R/)
+ text.remove(/\R+/)
+ end
+
+ def squish(text)
+ text.gsub(/[[:space:]]+/, " ").strip
+ end
+
+ def hankaku_kana(text)
+ NKF.nkf("-wxZ4", text)
end
end
end