# File lib/erbook/to_xhtml.rb, line 42 def to_xhtml aInline = false protect(self, VERBATIM_TAGS, true) do |text| html = protect(text, PROTECTED_TAGS, false) {|s| s.thru_maruku aInline } # Markdown's "code spans" should really be "pre spans" while html.gsub! %r{(<pre>)<code>(.*?)</code>(</pre>)}m, '\1\2\3' end # ensure tables have a border: this *greatly* improves # readability in text-based web browsers like w3m and lynx html.gsub! %r/<table\b/, '\& border="1"' # add syntax coloring html.thru_coderay end end