This is a very minor bug, but I still think it is important to point it out (maybe it was already).

I voted another question to be closed as duplicate of PHP preg_replace \

Since the title ends with a backslash, the text generated is:

enter image description here

which results in

enter image description here

Though, linking to the question in this question (by just inserting the link) obviously creates an appropriate link. Maybe this automatic link detection / title creation should be done for comments as well, to avoid this issue (which I admit is a minor case)?

(Unfortunately it does not look like escaping the backslash (\\) helps in any way).

Other problematic characters:


I "fixed" this a long time ago. Scare quotes because I cheated; here's the relevant snippet from the code:

public static class MarkdownMaker
    /// <summary>
    /// Returns a [markdown](http://link) that, when run through markdown, creates HTML
    /// where linkText is displayed exactly as given. In other words, an asterisk in linkText
    /// is visible as an asterisk to the user (and cannot cause unwanted italicization),
    /// a closing bracket in linkText doesn't break the link, but is actually visible as
    /// a closing bracket, etc. If markdownMini is true, it's for putting it in comments,
    /// otherwise it's for posts.
    /// </summary>
    public static string Link(string linkText, string url, bool markdownMini)
        // ...
        if (markdownMini)
        // ...

            // there is absolutely no way to end a comment link with a backslash
            // -- it would always escape the closing "]". So we're using an ugly
            // unicode hack -- U+2216 is Set Minus, which looks closest to a regular
            // backslash
            if (linkText.EndsWith(@"\"))
                linkText = linkText.Substring(0, linkText.Length - 1) + "\u2216";

        // ...


You must log in to answer this question.

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