The problem is that three or more hyphens at the beginning of a line
should get marked up into a horizontal line, but two hyphens at the
beginning of a line are treated as toggling markup off (private
comments). This only happens in plain text files. In .rb files, the
behavior is correct.
It was first reported in [1], and again in [2].
References:
[1] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/183692
[2] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/7651
This is a patch against 1.8.6:
--- parsers/parse_simple.rb.bck 2006-03-31 13:01:49.000000000 -0800
+++ parsers/parse_simple.rb 2006-03-31 13:01:49.000000000 -0800
@@ -35,7 +35,7 @@
end
def remove_private_comments(comment)
- comment.gsub(/^--.*?^\+\+/m, '').sub(/^--.*/m, '')
+ comment.gsub(/^--(?!-).*?^\+\+/m, '').sub(/^--(?!-).*/m, '')
end
end
end |