The format [text](url) is the standard format for using links in the comments. And it works just fine even if the text contains MathJax.

Normally, adding spaces inside MathJax do not influence the end result. However, it seems that if inside the MathJax we have [...] then spaces can cause link not to be rendered correctly. (I have noticed this when there is space before the last dollar in the title of the link. But possible there are also some other situations.) I will also explicitly mention that I am aware of the fact that if [ or ] are used outside of MathJax, they have to be escaped.

To include some example: Both [Divisibility in $\mathbb{Z}[X]$](https://math.stackexchange.com/q/3179896) Divisibility in $\mathbb{Z}[X]$ and [Divisibility in $\mathbb{Z}[X] $](https://math.stackexchange.com/q/3179896) Divisibility in $\mathbb{Z}[X] $ both work correctly in a post, but in a comment the latter does not work. (See the comments below this post and also a screenshot showing how they are displayed at the moment.)


Even if this is not going to be fixed, at least I would like to know whether I can count on the fact that the comments that work correctly now will be rendered the same in the future. (Not too long ago there was change in the Stack Exchange software which caused many comments to be rendered rather differently than they looked at the time when they were posted. So I am basically asking for assurance that similar problem will not come up with comments with hyperlinks containing MathJax.)

EDIT: It's possible that this is related to this problem with MarkDown in comments: Trailing spaces on comment link format. (See also: Why is mini-markdown working in some of my comments, but broken in others? An answer there says: "you have extra leading or trailing spaces in some of them, which are no longer allowed. It's by design because of tricksters who wish to subvert the minimum character comment input.".)

  • 5
    $\begingroup$ Test: [Divisibility in $\mathbb{Z}[X]$](https://math.stackexchange.com/q/3179896) works: Divisibility in $\mathbb{Z}[X]$. However: [Divisibility in $\mathbb{Z}[X] $](https://math.stackexchange.com/q/3179896) [Divisibility in $\mathbb{Z}[X] $](math.stackexchange.com/q/3179896). $\endgroup$ Commented Aug 22, 2019 at 9:50
  • 4
    $\begingroup$ Test without MathJax: Although these formats both work in a post, in comments we have to escape square brackets: [Divisibility in Z\[X\]](https://math.stackexchange.com/q/3179896) Divisibility in Z[X] and [Divisibility in Z[X]](https://math.stackexchange.com/q/3179896) [Divisibility in Z[X]](math.stackexchange.com/q/3179896). $\endgroup$ Commented Aug 22, 2019 at 9:51
  • 3
    $\begingroup$ Test what happens to links from the first comment if we add backslash: [Divisibility in $\mathbb{Z}\[X\]$](https://math.stackexchange.com/q/3179896) Divisibility in $\mathbb{Z}\[X\]$ and [Divisibility in $\mathbb{Z}\[X\] $](https://math.stackexchange.com/q/3179896) Divisibility in $\mathbb{Z}[X] $. $\endgroup$ Commented Aug 22, 2019 at 9:52
  • $\begingroup$ $$\text{Divisibility in }\mathbb{Z},\left [X\right ] $$ $\endgroup$
    – user645636
    Commented Sep 15, 2019 at 22:19
  • $\begingroup$ ${\text{Divisibility in }\mathbb{Z},\left [X\right ]} $ second one in case my first didn't leave the space. $\endgroup$
    – user645636
    Commented Sep 17, 2019 at 12:54


You must log in to answer this question.

Browse other questions tagged .