Avoid parsing "Notes:**" as a bare URI.
This avoids parsing bare URIs that start with a scheme + colon + `*`, `_`, or `]`. Closes #3570.
This commit is contained in:
parent
1fe1c162ac
commit
bcc848d773
2 changed files with 8 additions and 0 deletions
|
@ -463,6 +463,8 @@ uri :: Stream [Char] m Char => ParserT [Char] st m (String, String)
|
|||
uri = try $ do
|
||||
scheme <- uriScheme
|
||||
char ':'
|
||||
-- Avoid parsing e.g. "**Notes:**" as a raw URI:
|
||||
notFollowedBy (oneOf "*_]")
|
||||
-- We allow sentence punctuation except at the end, since
|
||||
-- we don't want the trailing '.' in 'http://google.com.' We want to allow
|
||||
-- http://en.wikipedia.org/wiki/State_of_emergency_(disambiguation)
|
||||
|
|
6
test/command/3570.md
Normal file
6
test/command/3570.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
```
|
||||
% pandoc -f markdown+autolink_bare_uris
|
||||
**Notes:**
|
||||
^D
|
||||
<p><strong>Notes:</strong></p>
|
||||
```
|
Loading…
Add table
Reference in a new issue