You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hostnames without a trailing dot are potentially ambiguous. A trailing dot means that the hostname is fully qualified and may not be relative to the local search domain.
Also, a URI can have a dot at the end of the "path"portion. For instance, https://en.wikipedia.org/wiki/Washington,_D.C.
This means you can't safely assume that the final dot is not part of the URL.
However, you rarely need to use fully qualified domains. Only in very specific situations where a URL might be ambiguous. Also, URLs with trailing period are very rare.
So I really don't know if we should go for practicality or correctness.
The practicality argument is that you rarely need periods at the end of the url and in most cases the period marks the end of the sentence.
The correctness argument is that you can't safely assume the period isn't needed at the end of the URL.
There's also the compatibility argument, since showdown as a GitHub flavor, which tries to follow GFM as much as possible, so I think the compromise would be to create an option that treats URLs as GitHub does (in which trailing punctuation marks are left outside the URL), see #266
This was added as a new option called excludeTrailingPunctuationFromURLs. Enabling this will remove trailing punctuation and parenthesis from URL parsing in auto linking.
If the input is:
... then the trailing full stop should be excluded from the link. (This is how GMail, etc, works.)
Would it be safe to skip all trailing punctuation marks?
The text was updated successfully, but these errors were encountered: