• Forum
  • Lounge
  • Putting (edit: just a) url in [code][/co

Putting (edit: just a) url in [code][/code] tags :-(

Where has this annoying fad of putting urls in [code][/code] tags come from?

Edit: clarification: I'm talking about putting urls, all on their own, inside [code][/code] tags. In this case, the interaction of the comment and url handling kills the link. A url in a C++ comment block in code is fine.

The tagging makes the link unnavigable, which is really annoying!

Pretty (?) but useless... :-(

As nature intended. :-)

Using the second, actual link you can even navigate to the dictionary definition of unnavigable!

Please don't do it!!!

Edit: [output][/output] and [quote][/quote] are fine, if you insist on a colo(u)red background!



PS This is to do with cplusplus.com's handling code:

For the code you get (extra line breaks added to make layout more friendly?)

<span class="auto">
<code class="source">

For the other you get the required <A></A> tags:

<a href="http://www.thefreedictionary.com/unnavigable" >
Last edited on
Who did this?
See this thread for two culprits...

Windows Forms - printing the textBox's content
Turns out [output][/output] and [quote][/quote] are fine, just not [code][/code]...




So if colo(u)red background are your thing...

Last edited on
> The tagging makes the link unnavigable, which is really annoying!

Does it? http://www.cplusplus.com/forum/beginner/102284/#msg550058

> Please don't do it!!!

Please do it more often.

Place the link to documentation where it is most relevant and useful - right next to the code that uses the feature.
Under some conditions, [code][/code] tags do stop the link from working. I added a PS to the OP showing the HTML that gets generated: there are no <A></A> tags in the HTML generated for the URLS in the code block.

The problem seems to occur then it's just a url in [code][/code] tags

Or are you saying that this is navigable for you?

I see that it works if it's in a C++ comment!

// http://www.thefreedictionary.com/unnavigable


PS Have added clarification to OP -- that this issue is about just a url in [code][/code] tags
Last edited on


// https://www.google.com/

if(x < 5)
    goto http;
Last edited on
> Or are you saying that this is navigable for you?

No, it isn't.

Because you do not have the knowledge required to place a navigable url inside a code block. Apparently you believe that the feat is impossible for everyone else too.

// see: http://www.thefreedictionary.com/navigable

Note: You would have been disabused of that wrong notion if you had bothered to click on the link I posted earlier instead of continuing with your rant.

I did check the code you pointed me at and then added additional info to my OP: that the problem is urls on their own inside the tags, not when they're in C++ comment block inside tags.

My rant still holds about sticking just a url in [code][/code] tags.


PS And I've just tweaked the topic title in an attempt to further clarify.
Last edited on
Topic archived. No new replies allowed.