mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-02 13:45:49 +00:00
Previously pandoc would parse
[link to (@a)](url)
as a citation; similarly
[(@a)]{#ident}
This is undesirable. One should be able to use example references
in citations, and even if `@a` is not defined as an example
reference, `[@a](url)` should be a link containing an author-in-text
citation rather than a normal citation followed by literal `(url)`.
Closes #7632.
67 lines
1.2 KiB
Markdown
67 lines
1.2 KiB
Markdown
```
|
|
% pandoc -t native
|
|
(@a) First case
|
|
|
|
[link to (@a)](url)
|
|
^D
|
|
[ OrderedList
|
|
( 1 , Example , TwoParens )
|
|
[ [ Plain [ Str "First" , Space , Str "case" ] ] ]
|
|
, Para
|
|
[ Link
|
|
( "" , [] , [] )
|
|
[ Str "link" , Space , Str "to" , Space , Str "(1)" ]
|
|
( "url" , "" )
|
|
]
|
|
]
|
|
```
|
|
|
|
```
|
|
% pandoc -t native
|
|
[@a]{.class}
|
|
^D
|
|
[ Para
|
|
[ Span
|
|
( "" , [ "class" ] , [] )
|
|
[ Cite
|
|
[ Citation
|
|
{ citationId = "a"
|
|
, citationPrefix = []
|
|
, citationSuffix = []
|
|
, citationMode = AuthorInText
|
|
, citationNoteNum = 1
|
|
, citationHash = 0
|
|
}
|
|
]
|
|
[ Str "@a" ]
|
|
]
|
|
]
|
|
]
|
|
|
|
```
|
|
|
|
```
|
|
% pandoc -t native
|
|
[@a](url)
|
|
^D
|
|
[ Para
|
|
[ Link
|
|
( "" , [] , [] )
|
|
[ Cite
|
|
[ Citation
|
|
{ citationId = "a"
|
|
, citationPrefix = []
|
|
, citationSuffix = []
|
|
, citationMode = AuthorInText
|
|
, citationNoteNum = 1
|
|
, citationHash = 0
|
|
}
|
|
]
|
|
[ Str "@a" ]
|
|
]
|
|
( "url" , "" )
|
|
]
|
|
]
|
|
|
|
```
|