[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rdoc markup question

Gary Wright

4/30/2007 2:53:00 AM

Is there a way to disable rdoc's automatic cross referencing of method
names? I've got a method named 'null' but I don't want every instance
of the word 'null' in the comments to be hyperlinked to the method
definition. I tried writing '\null' or 'n\ull' but then the backslash
shows up in the comments.

Similarly I also found that when I have XML strings in the comments
I can either use "\<!-- comment -->" and have the \ show up in the
comments
or have "<!-- comment -->" and have the rdoc parser die on me.

Any suggestions?


Gary Wright




16 Answers

Daniel Berger

4/30/2007 3:56:00 AM

0

On Apr 29, 8:52 pm, Gary Wright <gwtm...@mac.com> wrote:
> Is there a way to disable rdoc's automatic cross referencing of method
> names? I've got a method named 'null' but I don't want every instance
> of the word 'null' in the comments to be hyperlinked to the method
> definition. I tried writing '\null' or 'n\ull' but then the backslash
> shows up in the comments.

Nope. I brought this up at
http://groups.google.com/group/ruby-talk-google/browse_frm/thread/9379ed6b1c907f17/82b5df7ee399b70d?#82b5df...

I find it annoying, too.

> Similarly I also found that when I have XML strings in the comments
> I can either use "\<!-- comment -->" and have the \ show up in the
> comments
> or have "<!-- comment -->" and have the rdoc parser die on me.

Sounds like a bug to me. Please report it.

Regards,

Dan


Gary Wright

4/30/2007 8:37:00 PM

0


On Apr 30, 2007, at 12:00 AM, Daniel Berger wrote:

> On Apr 29, 8:52 pm, Gary Wright <gwtm...@mac.com> wrote:
>> Is there a way to disable rdoc's automatic cross referencing of
>> method
>> names? I've got a method named 'null' but I don't want every
>> instance
>> of the word 'null' in the comments to be hyperlinked to the method
>> definition. I tried writing '\null' or 'n\ull' but then the
>> backslash
>> shows up in the comments.
>
> Nope. I brought this up at
> http://groups.google.com/group/ruby-talk-google/browse_f...
> 9379ed6b1c907f17/82b5df7ee399b70d?#82b5df7ee399b70d
>
> I find it annoying, too.

I read that thread. I think the default heuristic is ok. In the
thread you suggested an explicit syntax to trigger the cross-reference.
I'd suggest an explicit syntax to disable the cross-reference.

I could of course come up with a patch but even if adopted it would
take a while to propagate through the Ruby ecosystem. I was hoping
there was a trick or hack of some sort.

I see that this issue is actually entered into the the tracker for rdoc
as issue 9316. There are quite a few unresolved issues in the list...


Gary Wright




Gary Wright

4/30/2007 8:54:00 PM

0


On Apr 30, 2007, at 12:00 AM, Daniel Berger wrote:

> On Apr 29, 8:52 pm, Gary Wright <gwtm...@mac.com> wrote:
>> Similarly I also found that when I have XML strings in the comments
>> I can either use "\<!-- comment -->" and have the \ show up in the
>> comments
>> or have "<!-- comment -->" and have the rdoc parser die on me.
>
> Sounds like a bug to me. Please report it.

I've entered this into the tracker for rdoc (#10474):

In markup/simple_markup/inline.rb:

add_special(/<!--(.*?)-->/, :COMMENT)

marks an XML comment to be given special handling but the method
handle_special_COMMENT
is never defined. This causes an unhandled exception when the HTML
generator runs:

/opt/local/lib/ruby/1.8/rdoc/markup/simple_markup/to_html.rb:230:in
`convert_special': Unhandled special: Special: type=17,
text="<!-- foo -->" (RuntimeError)

I'm not sure if the intent was to insert the XML comment into the
generated XHTML or to
escape the comment so that it appeared as readable text.

The following code illustrates the problem:

class A
# The line below is OK because it is processed as a <pre> block:
# <!-- comment -->
def method1
end

# The line below is OK because it is protected by the \.
# \<!-- comment-->
def method2
end


# The line below is OK because it doesn't match any markup patterns
# <foo>some text</foo>
def method4
end

# The line below is not OK because the handler for the :COMMENT
pattern
# is not defined:
# <!-- comment-->
def method3
end

end



Gary Wright




The Chief Instigator

6/14/2009 6:08:00 PM

0

On 2009-06-14, American Eagle <AE@USA.com> wrote:
>The Chief Instigator wrote:
>> On 2009-06-14, Truthseeker <kurtus@citywest.ca> wrote:
>>
>>> "mirjam" <mirjam@actcom.co.il> wrote in message
>>> news:9e1014a4-e4f0-4fb6-a8ec-f62ffb98c24e@r10g2000yqa.googlegroups.com...
>>>>> Mirjam, Whether Revelation has anything to do or not do with Jews is
>>>>> unimportant. The poster is spewing nonsense and should be ignored, not
>>>>> responded to. The poster is free to post anything he/she chooses in an
>>>>> unmoderated newsgroup of course, but you are equally free to ignore it.
>>>> Mr Ranzetti ,
>>>>
>>>> it is interesting , how you ALWAYS jump to deefend the rights of
>>>> AntiSemites to post their hate ,,
>>>> I oppose Hate posts ,,,,
>>>>
>>>> mirjam
>>
>>> Get real and what is it Kenneth McVay and his copies are doing.
>>> Kurt Knoll.
>>
>> Why don't you do as your F?hrer did on 1945 April 30th, KnollKook?

>You are definitely a full fledged inbred moron. Its obvious that you
>come up with this shit to compensate for not having an intelligent
>response. Go bite the foreskin off an ersatz jewish baby. What a pack of
>heathen pagan fools.

I'm not a pagan, little anonymous Nazi coward abusing German ISPs. Why
don't you consider my advice? (Even if you have to beg someone to translate
those big words for you.)

--
Patrick L. "The Chief Instigator" Humphrey (patrick@io.com) Houston, Texas
www.io.com/~patrick/aeros.php (TCI's 2008-09 Houston Aeros) AA#2273
LAST GAME: Manitoba 3, Houston 1 (May 25: Moose advance, 4-2)
NEXT GAME: The 2009-10 opener in October, TBA

Truthseeker

6/14/2009 7:39:00 PM

0

You must be kidding is McVay still alive if so what name is he using now.
kk

"Michael Ejercito" <mejercit@hotmail.com> wrote in message
news:25fa2d1a-fdb7-4bc8-932e-f52c9e88f0ca@o21g2000prn.googlegroups.com...
On Jun 13, 8:47 pm, "Truthseeker" <kur...@citywest.ca> wrote:
> Get real and what is it Kenneth McVay and his copies are doing.
> Kurt Knoll.
>
McVay tells the truth about the Holocaust.


Michael


Gary Renzetti

6/14/2009 8:39:00 PM

0

The Chief Instigator wrote:
> On 2009-06-14, Truthseeker <kurtus@citywest.ca> wrote:
>
>> "mirjam" <mirjam@actcom.co.il> wrote in message
>> news:9e1014a4-e4f0-4fb6-a8ec-f62ffb98c24e@r10g2000yqa.googlegroups.com...
>>>> Mirjam, Whether Revelation has anything to do or not do with Jews is
>>>> unimportant. The poster is spewing nonsense and should be ignored, not
>>>> responded to. The poster is free to post anything he/she chooses in an
>>>> unmoderated newsgroup of course, but you are equally free to ignore it.
>>> Mr Ranzetti ,
>>>
>>> it is interesting , how you ALWAYS jump to deefend the rights of
>>> AntiSemites to post their hate ,,
>>> I oppose Hate posts ,,,,
>>>
>>> mirjam
>
>> Get real and what is it Kenneth McVay and his copies are doing.
>> Kurt Knoll.
>
> Why don't you do as your F?hrer did on 1945 April 30th, KnollKook?
>
What? Get married?

The Chief Instigator

6/15/2009 12:12:00 AM

0

On 2009-06-14, Michael Ejercito <mejercit@hotmail.com> wrote:
>On Jun 13, 10:24?pm, The Chief Instigator <patr...@io.com> wrote:
>> On 2009-06-14, Truthseeker <kur...@citywest.ca> wrote:
>>
>>
>>
>> >"mirjam" <mir...@actcom.co.il> wrote in message
>> >news:9e1014a4-e4f0-4fb6-a8ec-f62ffb98c24e@r10g2000yqa.googlegroups.com...
>>
>> >>> Mirjam, Whether Revelation has anything to do or not do with Jews is
>> >>> unimportant. The poster is spewing nonsense and should be ignored, not
>> >>> responded to. The poster is free to post anything he/she chooses in an
>> >>> unmoderated newsgroup of course, but you are equally free to ignore it.
>>
>> >> Mr Ranzetti ,
>>
>> >> it is interesting , how you ALWAYS jump to deefend the rights of
>> >> AntiSemites to post their hate ,,
>> >> I oppose Hate posts ,,,,
>>
>> >> mirjam
>> >Get real and what is it Kenneth McVay and his copies are doing.
>> >Kurt Knoll.
>>
>> Why don't you do as your F?hrer did on 1945 April 30th, KnollKook?

> He needs a handgun, some Jack Daniels and directions to a restroom
>in a building owned by Richard Mellon Scaife.

You're assuming he has any actual understanding of what rational adults
think about his addiction to attention. So far, there's little (if any)
supporting his whining.

--
Patrick L. "The Chief Instigator" Humphrey (patrick@io.com) Houston, Texas
www.io.com/~patrick/aeros.php (TCI's 2008-09 Houston Aeros) AA#2273
LAST GAME: Manitoba 3, Houston 1 (May 25: Moose advance, 4-2)
NEXT GAME: The 2009-10 opener in October, TBA

The Chief Instigator

6/15/2009 12:16:00 AM

0

On 2009-06-14, Gary Renzetti <lizgary@connection.com> wrote:
>The Chief Instigator wrote:
>> On 2009-06-14, Truthseeker <kurtus@citywest.ca> wrote:
>>
>>> "mirjam" <mirjam@actcom.co.il> wrote in message
>>> news:9e1014a4-e4f0-4fb6-a8ec-f62ffb98c24e@r10g2000yqa.googlegroups.com...
>>>>> Mirjam, Whether Revelation has anything to do or not do with Jews is
>>>>> unimportant. The poster is spewing nonsense and should be ignored, not
>>>>> responded to. The poster is free to post anything he/she chooses in an
>>>>> unmoderated newsgroup of course, but you are equally free to ignore it.
>>>> Mr Ranzetti ,
>>>>
>>>> it is interesting , how you ALWAYS jump to deefend the rights of
>>>> AntiSemites to post their hate ,,
>>>> I oppose Hate posts ,,,,
>>>>
>>>> mirjam
>>
>>> Get real and what is it Kenneth McVay and his copies are doing.
>>> Kurt Knoll.
>>
>> Why don't you do as your F?hrer did on 1945 April 30th, KnollKook?
>>
>What? Get married?

That was his next to last act...too bad the one subsequent to that wasn't
first, but then Adolf wasn't about to leave any evidence, and he managed to
fail in that as well. Too bad it didn't happen 55 years sooner.

--
Patrick L. "The Chief Instigator" Humphrey (patrick@io.com) Houston, Texas
www.io.com/~patrick/aeros.php (TCI's 2008-09 Houston Aeros) AA#2273
LAST GAME: Manitoba 3, Houston 1 (May 25: Moose advance, 4-2)
NEXT GAME: The 2009-10 opener in October, TBA

Majd al-Din

6/15/2009 3:26:00 AM

0

The Chief Instigator wrote:
> On 2009-06-14, Gary Renzetti <lizgary@connection.com> wrote:
>> The Chief Instigator wrote:
>>> On 2009-06-14, Truthseeker <kurtus@citywest.ca> wrote:
>>>
>>>> "mirjam" <mirjam@actcom.co.il> wrote in message
>>>> news:9e1014a4-e4f0-4fb6-a8ec-f62ffb98c24e@r10g2000yqa.googlegroups.com...
>>>>>> Mirjam, Whether Revelation has anything to do or not do with Jews is
>>>>>> unimportant. The poster is spewing nonsense and should be ignored, not
>>>>>> responded to. The poster is free to post anything he/she chooses in an
>>>>>> unmoderated newsgroup of course, but you are equally free to ignore it.
>>>>> Mr Ranzetti ,
>>>>>
>>>>> it is interesting , how you ALWAYS jump to deefend the rights of
>>>>> AntiSemites to post their hate ,,
>>>>> I oppose Hate posts ,,,,
>>>>>
>>>>> mirjam
>>>> Get real and what is it Kenneth McVay and his copies are doing.
>>>> Kurt Knoll.
>>> Why don't you do as your F?hrer did on 1945 April 30th, KnollKook?
>>>
>> What? Get married?
>
> That was his next to last act...too bad the one subsequent to that wasn't
> first, but then Adolf wasn't about to leave any evidence, and he managed to
> fail in that as well. Too bad it didn't happen 55 years sooner.

Actually it is too bad that he didn't get about a 5 year earlier start.
In which case we wouldn't have to see this useless crapola from you.
>

The Chief Instigator

6/15/2009 10:49:00 PM

0

On 2009-06-15, Majd al-Din <Islam@Sucks.com> wrote:
>The Chief Instigator wrote:
>> On 2009-06-14, Gary Renzetti <lizgary@connection.com> wrote:
>>> The Chief Instigator wrote:
>>>> On 2009-06-14, Truthseeker <kurtus@citywest.ca> wrote:
>>>>
>>>>> "mirjam" <mirjam@actcom.co.il> wrote in message
>>>>> news:9e1014a4-e4f0-4fb6-a8ec-f62ffb98c24e@r10g2000yqa.googlegroups.com...
>>>>>>> Mirjam, Whether Revelation has anything to do or not do with Jews is
>>>>>>> unimportant. The poster is spewing nonsense and should be ignored, not
>>>>>>> responded to. The poster is free to post anything he/she chooses in an
>>>>>>> unmoderated newsgroup of course, but you are equally free to ignore it.
>>>>>> Mr Ranzetti ,
>>>>>>
>>>>>> it is interesting , how you ALWAYS jump to deefend the rights of
>>>>>> AntiSemites to post their hate ,,
>>>>>> I oppose Hate posts ,,,,
>>>>>>
>>>>>> mirjam
>>>>> Get real and what is it Kenneth McVay and his copies are doing.
>>>>> Kurt Knoll.
>>>> Why don't you do as your F?hrer did on 1945 April 30th, KnollKook?
>>>>
>>> What? Get married?
>>
>> That was his next to last act...too bad the one subsequent to that wasn't
>> first, but then Adolf wasn't about to leave any evidence, and he managed to
>> fail in that as well. Too bad it didn't happen 55 years sooner.

>Actually it is too bad that he didn't get about a 5 year earlier start.
>In which case we wouldn't have to see this useless crapola from you.

....says the oh-so-brave anonymous coward. Deal with what happened, instead
of what you fantasize should have happened. Thanks for your confirmation
that you're clueless enough to not be able to hit the Gulf from the 61st
Street pier.

--
Patrick L. "The Chief Instigator" Humphrey (patrick@io.com) Houston, Texas
www.io.com/~patrick/aeros.php (TCI's 2008-09 Houston Aeros) AA#2273
LAST GAME: Manitoba 3, Houston 1 (May 25: Moose advance, 4-2)
NEXT GAME: The 2009-10 opener in October, TBA