AsciiDoc writer: fix commas in link text.
Commas in link text trigger interpretation of attributes. To block this, we replace them with numeric entities. Closes #8070.
This commit is contained in:
parent
1906ae0548
commit
3df55b4a4a
2 changed files with 14 additions and 1 deletions
|
@ -560,7 +560,8 @@ inlineToAsciiDoc opts (Link _ txt (src, _tit)) = do
|
|||
-- relative: link:downloads/foo.zip[download foo.zip]
|
||||
-- abs: http://google.cod[Google]
|
||||
-- or my@email.com[email john]
|
||||
linktext <- inlineListToAsciiDoc opts txt
|
||||
let fixCommas = T.replace "," "," -- see #8070
|
||||
linktext <- fmap fixCommas <$> inlineListToAsciiDoc opts txt
|
||||
let isRelative = T.all (/= ':') src
|
||||
let needsPassthrough = "--" `T.isInfixOf` src
|
||||
let prefix = if isRelative
|
||||
|
|
12
test/command/8070.md
Normal file
12
test/command/8070.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
```
|
||||
% pandoc -f html -t asciidoc
|
||||
<p><a href="https://docs.oracle.com/database/121/BRADV/rcmxplat.htm#BRADV724">12.1
|
||||
manual, Database Backup and Recovery User’s Guide:
|
||||
<span class="enumeration_chapter">Chapter 28</span> Transporting Data Across Platforms,
|
||||
Steps to Transport a Database to a Different Platform Using Backup Sets</a></p>
|
||||
^D
|
||||
https://docs.oracle.com/database/121/BRADV/rcmxplat.htm#BRADV724[12.1
|
||||
manual, Database Backup and Recovery User’s Guide:
|
||||
[.enumeration_chapter]#Chapter 28# Transporting Data Across Platforms,
|
||||
Steps to Transport a Database to a Different Platform Using Backup Sets]
|
||||
```
|
Loading…
Add table
Reference in a new issue