In an answer, I was writing the following sentence and I noticed the period was not rendered.

(See http://ell.stackexchange.com/questions/4488/using-the-future-tense-in-a-dependent-clause-starting-with-when.)


Why isn't the period rendered? If I write a generic URL, it is rendered.

(See http://drupal.org.)

(See http://drupal.org.)

  • 6
    Because it's (incorrectly) included in the link in both cases. Since the drupal link is displayed verbatim, but the question link is replaced with the question's title, the former displays the period but the latter doesn't. – balpha May 13 '13 at 9:31

When URLs are auto-linked, we never include a trailing period (or comma or question mark etc.) for reasons that are very obvious in your question. However the change to improve auto-linking around trailing parentheses is made in such a way that the closing paren is first included in the to-be-linked URL, only to be excluded again if we find that it has no matching opening paren inside the link.

This exclusion of the trailing paren obviously changes the character that ends the URL, so in this case we have to check again that the new trailing character (in your case, the period) is still a legal character to end the auto-linked URL, If it's not (as in this case), it has to be excluded as well.

This is fixed in both versions in the next build. I realized while typing this answer that this still isn't quite right, since it fails to handle situations where more than one such trailing character ends the url:

(y u no http://google.com???)

– I'll fix that as well. That's a much more rare edge case though.


As suggested already by @balpha in comment, the question titles replace their link from posts, a dot is included in it too. The . character is valid in URLs and hence, passed as it is for fetching the page title.

As for your drupal link example, you can notice that (See http://drupal.org.) while rendering correctly, attaches an ending period character to the link too!

So, instead of getting (See [http://drupal.org](http://drupal.org).), you instead get the result to be (See [http://drupal.org.](http://drupal.org.)).

You must log in to answer this question.

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