diff --git a/lessons/lesson-md-gen.rbx b/lessons/lesson-md-gen.rbx index 50e5841..d91eafe 100644 --- a/lessons/lesson-md-gen.rbx +++ b/lessons/lesson-md-gen.rbx @@ -30,9 +30,9 @@ module MarkdownTranslator yield end + # via http://blog.macromates.com/2006/wrapping-text-with-regular-expressions/ def wrap_text(txt, col = 80) - txt.gsub(/(.{1,#{col}})( +|$\n?)|(.{1,#{col}})/, - "\\1\\3\n") + txt.gsub(/(.{1,#{col}})( +|$\n?)|(.{1,#{col}})/, "\\1\\3\n") end def para *lines