Feature Requests: Browse | Submit New | Admin

[#21380] RDoc should support Inline Source Code Markup

Date:
2008-07-29 21:35
Priority:
3
Submitted By:
Designing Patterns (designingpatts)
Assigned To:
Nobody (None)
Category:
RDoc::Generator / rdoc command
State:
Open
Summary:
RDoc should support Inline Source Code Markup

Detailed description
It often is necessary to include source code in gem README files.  My company, for instance, always puts example code
into our gem README.txt files (see http://configtoolkit.rubyforge.org, for example).  There is no rdoc markup that can
describe a block of text as source code, however.  Thus, in order for the text to be formatted properly, one must declare
it as preformatted.  Generic reformatted text cannot be syntax-highlighted, however (unlike the method source code that
rdoc inlines).

RDoc should be enhanced with new descriptive markup that can describe source code blocks.  The markup could look like
something this:
<code language=”ruby”>
</code>
although no doubt better markup possibilities can be devised.

Now, RDoc already is capable of driving syntax-highlighting for Ruby code but not for other languages.  Perhaps, based
on the template, rdoc either can parse Ruby code itself, or the template could use a package like
http://code.google.com/p/syntaxhighlighter/, to provide syntax-highlighting for multiple languages.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item