Markdown reader: Allow reference link labels starting with @...
...if citations extension disabled. Example: in [link text][@a] [@a]: url `link text` isn't hyperlinked because `[@a]` is parsed as a citation. Previously this happened whether or not the `citations` extension was enabled. Now it happens only if the `citations` extension is enabled. Closes #3209.
This commit is contained in:
parent
7db4dd46dc
commit
eced02d70e
1 changed files with 2 additions and 1 deletions
|
@ -1774,7 +1774,8 @@ referenceLink :: (Attr -> String -> String -> Inlines -> Inlines)
|
|||
referenceLink constructor (lab, raw) = do
|
||||
sp <- (True <$ lookAhead (char ' ')) <|> return False
|
||||
(_,raw') <- option (mempty, "") $
|
||||
lookAhead (try (spnl >> normalCite >> return (mempty, "")))
|
||||
lookAhead (try (guardEnabled Ext_citations >>
|
||||
spnl >> normalCite >> return (mempty, "")))
|
||||
<|>
|
||||
try (spnl >> reference)
|
||||
when (raw' == "") $ guardEnabled Ext_shortcut_reference_links
|
||||
|
|
Loading…
Add table
Reference in a new issue