# RDoc: preserve special chars in \<tt\> Was: Re: bug in rdoc?

**URL:** <https://www.ruby-forum.com/t/rdoc-preserve-special-chars-in-tt-was-re-bug-in-rdoc/72399>\
**Category:** Ruby\
**Created:** [October 17, 2006, 12:19am UTC](https://www.ruby-forum.com/t/rdoc-preserve-special-chars-in-tt-was-re-bug-in-rdoc/72399 "2006-10-17T00:19:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![breko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ea666f/32.png) [@breko](https://www.ruby-forum.com/u/breko)\
**Post date:** [October 17, 2006, 12:19am UTC](https://www.ruby-forum.com/t/rdoc-preserve-special-chars-in-tt-was-re-bug-in-rdoc/72399/1 "2006-10-17T00:19:49Z")

</div>

On 10/16/06, Wybo D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > =end  
> > > > Why does this bother you?
> > 
> > Because it’s not clearly visible that one must type two dashes there.  
> > The solution would be to not convert special chars in blocks
> 
> I agree!

Attached is a patch that implements this (special chars are preserve  
inside tt tags). I don’t know much about RDoc internal, so please  
check it. I added a simple unit test, as well. I couldn’t manage CVS  
to includeit with others, so it’s attached separately.

---

<div class="post-metadata">

**Author:** ![breko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ea666f/32.png) [@breko](https://www.ruby-forum.com/u/breko)\
**Post date:** [October 17, 2006, 12:37pm UTC](https://www.ruby-forum.com/t/rdoc-preserve-special-chars-in-tt-was-re-bug-in-rdoc/72399/2 "2006-10-17T12:37:00Z")

</div>

That worked fine, thank you very much!

---

<div class="post-metadata">

**Author:** ![breko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ea666f/32.png) [@breko](https://www.ruby-forum.com/u/breko)\
**Post date:** [November 15, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/rdoc-preserve-special-chars-in-tt-was-re-bug-in-rdoc/72399/3 "2006-11-15T21:15:39Z")

</div>

On Oct 16, 2006, at 3:17 PM, Jan S. wrote:

> Attached is a patch that implements this (special chars are preserve  
> inside tt tags). I don’t know much about RDoc internal, so please  
> check it. I added a simple unit test, as well. I couldn’t manage CVS  
> to includeit with others, so it’s attached separately.  
> \<rdoc-tt.patch\>  
> \<TestToHtml.rb\>

Please post this to the bug tracker. Otherwise I’m sure to lose it:

[http://rubyforge.org/tracker/?atid=2474&group\_id=627&func=browse](http://rubyforge.org/tracker/?atid=2474&group_id=627&func=browse)

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)
