From: Dr Balwinder S Dheeman Date: 2005-05-04T15:14:45+09:00 Subject: Re: rdoc, how is about :br: ? --------------020808020803020708060501 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit On 05/04/2005 09:27 AM, Dr Balwinder S Dheeman wrote: > Hi rdoc experts! > > How is about adding a *:br:* directive? For example, I have a code like: > > # LIST [ACTIVE|NEWSGROUPS] [Wildmat]:br: > # LIST [ACTIVE.TIMES|EXTENSIONS|OVERVIEW.FMT] > def list(opts) > ... > end > > So that the :br: converts to *
* when generating HTML docs. > > I'm new to Ruby, have attempted to look in the sources of rdoc, but > could not out where do I add and, or modify the code? > > Thanks for any help in anticipation. NP, I have done it! -- Dr Balwinder Singh Dheeman Registered Linux User: #229709 CLLO (Chief Linux Learning Officer) Machines: #168573, 170593, 259192 Anu's Linux@HOME Distros: Ubuntu, Fedora, Knoppix More: http://anu.homelinux.net/~bsd/ Visit: http://counter.li.org/ --------------020808020803020708060501 Content-Type: text/x-patch; name="html_generator.rb.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="html_generator.rb.patch" --- html_generator.rb.orig 2005-04-11 17:57:27.000000000 +0000 +++ html_generator.rb 2005-05-04 05:58:08.650463698 +0000 @@ -237,6 +237,10 @@ end res = @markup.convert(content, @html_formatter) + + # Convert :br: to a forced line break + res.sub!(/:br:/i, '
') + if remove_para res.sub!(/^

/, '') res.sub!(/<\/p>$/, '') --------------020808020803020708060501--