About Social Code
summaryrefslogtreecommitdiff
path: root/tools/note.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tools/note.lua')
-rw-r--r--tools/note.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/note.lua b/tools/note.lua
index 8a790fc..e422468 100644
--- a/tools/note.lua
+++ b/tools/note.lua
@@ -7,7 +7,11 @@ local status_map = {"seedling", "budding", "evergreen"}
function Link(link)
if not string.find(link.target, "://") then
local note = meta_tools.get_note(link.target)
- return {pandoc.Link(note["title"], "/notes/"..link.target..".html")}
+ local text = note["title"]
+ if string.len(stringify(link.content)) ~= 0 then
+ text = link.content
+ end
+ return {pandoc.Link(text, "/notes/"..link.target..".html")}
else
return link
end