...
1-- input --
2URLs with punctuation are hard.
3We don't want to consume the end-of-sentence punctuation.
4
5For example, https://en.wikipedia.org/wiki/John_Adams_(miniseries).
6And https://example.com/[foo]/bar{.
7And https://example.com/(foo)/bar!
8And https://example.com/{foo}/bar{.
9And https://example.com/)baz{foo}.
10
11[And https://example.com/].
12
13-- gofmt --
14URLs with punctuation are hard.
15We don't want to consume the end-of-sentence punctuation.
16
17For example, https://en.wikipedia.org/wiki/John_Adams_(miniseries).
18And https://example.com/[foo]/bar{.
19And https://example.com/(foo)/bar!
20And https://example.com/{foo}/bar{.
21And https://example.com/)baz{foo}.
22
23[And https://example.com/].
24
25-- text --
26URLs with punctuation are hard. We don't want to consume the end-of-sentence
27punctuation.
28
29For example, https://en.wikipedia.org/wiki/John_Adams_(miniseries).
30And https://example.com/[foo]/bar{. And https://example.com/(foo)/bar! And
31https://example.com/{foo}/bar{. And https://example.com/)baz{foo}.
32
33[And https://example.com/].
34
35-- markdown --
36URLs with punctuation are hard. We don't want to consume the end-of-sentence punctuation.
37
38For example, [https://en.wikipedia.org/wiki/John\_Adams\_(miniseries)](https://en.wikipedia.org/wiki/John_Adams_(miniseries)). And [https://example.com/\[foo]/bar](https://example.com/[foo]/bar){. And [https://example.com/(foo)/bar](https://example.com/(foo)/bar)! And [https://example.com/{foo}/bar](https://example.com/{foo}/bar){. And [https://example.com/](https://example.com/))baz{foo}.
39
40\[And [https://example.com/](https://example.com/)].
41
42-- html --
43<p>URLs with punctuation are hard.
44We don't want to consume the end-of-sentence punctuation.
45<p>For example, <a href="https://en.wikipedia.org/wiki/John_Adams_(miniseries)">https://en.wikipedia.org/wiki/John_Adams_(miniseries)</a>.
46And <a href="https://example.com/[foo]/bar">https://example.com/[foo]/bar</a>{.
47And <a href="https://example.com/(foo)/bar">https://example.com/(foo)/bar</a>!
48And <a href="https://example.com/{foo}/bar">https://example.com/{foo}/bar</a>{.
49And <a href="https://example.com/">https://example.com/</a>)baz{foo}.
50<p>[And <a href="https://example.com/">https://example.com/</a>].
View as plain text