Patches: Browse | Submit New | Admin

[#11185] [rdoc] horzontal lines in plain text files

Date:
2007-05-28 18:08
Priority:
3
Submitted By:
Joel VanderWerf (vjoel)
Assigned To:
Eric Hodel (drbrain)
Category:
Documentation, ri, and rdoc
State:
Open
Summary:
[rdoc] horzontal lines in plain text files

Detailed description
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

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-09-20 02:46
Sender: Designing Patterns

I actually stumbled across this same problem when I added a horizontal
rule to RDoc's own documentation :).  This is fixed in RDoc
2.2.0.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_tonone2007-06-13 06:28zenspider
category_idMisc / Other Standard Library2007-05-30 04:08zenspider
category_idCrypto / Digest / Compression2007-05-30 03:51zenspider
artifact_group_idNone2007-05-30 03:41zenspider