We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceea755 commit 93c913aCopy full SHA for 93c913a
scripts/pandoc_fix_links.lua
@@ -7,16 +7,20 @@ function Link(el)
7
el.target = target
8
9
local content = {}
10
+ local has_markup = false
11
for _, item in ipairs(el.content) do
12
if item.text then
13
table.insert(content, item.text)
14
end
15
if item.content then
16
+ has_markup = true
17
for _, subitem in ipairs(item.content) do
18
table.insert(content, subitem.text)
19
20
21
- el.content = table.concat(content, '_')
22
+ if has_markup then
23
+ el.content = table.concat(content, '_')
24
+ end
25
return el
26
0 commit comments