Fix fix-xrefs.lua's empty link detection (#618)
* Fix `fix-xrefs.lua`'s empty link detection Since we now go directly from Markdown to HTML, Pandoc sees actually empty links instead of `???`. * Bump VERSION
This commit is contained in:
parent
4f3a0fdad1
commit
bba9a1d44b
|
@ -12,8 +12,8 @@ function Link(elem)
|
||||||
|
|
||||||
elem.target = 'https://search.nixos.org/options?channel=unstable&show=' .. option_name .. '&query=' .. option_name
|
elem.target = 'https://search.nixos.org/options?channel=unstable&show=' .. option_name .. '&query=' .. option_name
|
||||||
|
|
||||||
if #elem.content == 1 and elem.content[1].tag == 'Str' and elem.content[1].text == '???' then
|
if #elem.content == 0 or (#elem.content == 1 and elem.content[1].tag == 'Str' and elem.content[1].text == '???') then
|
||||||
elem.content[1].text = option_name
|
elem.content = option_name
|
||||||
end
|
end
|
||||||
|
|
||||||
return elem
|
return elem
|
||||||
|
|
Loading…
Reference in a new issue