3

Suppose I want to ask a question about some code that doesn't work and need to quote the following error message

There was no endpoint listening at http://localhost.here/Magic that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Now if I use "code" formatting (either prepending with whitespaces or quotes) there's no problem. Yet if I use a quote block (prepended with >) I'll get an error message saying that links cannot contain localhost, I have to wrap those in code blocks.

The deal is the error message I wanted to quote isn't really code, it's actually a quote. Also it's a very long text and so using code block will disable auto-wrapping at end of lines which isn't very convenient.

Could you please change the behavior so that http://localhost links are allowed in > quotes?

3
  • Could this error not equally contain a non-localhost URL? What do you propose then? One solution would be to not link URLs which don't resolve, rather than blocking them completely... Not that I'm a fan of that suggestion, just offering an alternative.
    – Matt
    May 24, 2013 at 10:15
  • 3
    That's not a bug in my view btw, pretty sure it's [by-design].
    – Mat
    May 24, 2013 at 10:15
  • +1. This bug forces me to use code block for log fragments or firebug header dumps, which is (I think) not semantically correct. Jul 1, 2013 at 20:38

2 Answers 2

2

Why not simply do this?

Can't find endpoint http://localhost/pipe/Endpoint

Markdown:

> Can't find endpoint `http://localhost/pipe/Endpoint`

You don't really want that URL to be clickable. Message length isn't an issue, though long URLs are a bit of a pain.

There was no endpoint listening at net.pipe://localhost/Magic, nor is there one listening on http://localhost/this/is/really/annoying/but/sometimes/URLs/are/just/way/too/long/to/format/in/any/sensible/way/sorry, that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

If the actual URL parameters/path/whatever aren't crucial, you could shorten it so as to male it a bit less visually distracting:

There was no endpoint listening at net.pipe://localhost/Magic, nor is there one listening on http://localhost/this/is/re[...]ay/sorry, that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

7
  • What if the message is very long? Auto-wrapping will be off and I'll have to insert linebreaks.
    – sharptooth
    May 24, 2013 at 10:19
  • I'm not sure I understand what you mean - a super-long URL?
    – Mat
    May 24, 2013 at 10:22
  • I've added one into the question. I hope that one is clear.
    – sharptooth
    May 24, 2013 at 10:30
  • 2
    Clear but I don't see a problem.
    – Mat
    May 24, 2013 at 10:32
  • @sharptooth: You can see the source of Mat's post to see he's only encoding the URL as code using "`", not the whole quote (if that's where the confusion lies...)
    – Matt
    May 24, 2013 at 10:33
  • @Matt: Nice, I didn't notice that.
    – sharptooth
    May 24, 2013 at 10:35
  • Okay, I didn't immediately notice the nice workaround you suggested. I outlined it in a separate answer.
    – sharptooth
    May 24, 2013 at 10:40
0

The workaround is to use > for the whole error message so that it is rendered as a quote and then mark the URL inside the text as code block like in the other answer:

There was no endpoint listening at http://localhost/Magic that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Note that here only the URL becomes a code block, the rest of the text is a quote and is auto-wrapped and gets all the applicable perks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .