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:
Naïm Favier 2023-02-15 15:25:29 +01:00 committed by GitHub
parent 4f3a0fdad1
commit bba9a1d44b
Failed to generate hash of commit
2 changed files with 3 additions and 3 deletions

View file

@ -1 +1 @@
36 37

View file

@ -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