[ol-conlang] Add conlang-md formating for dictionary links
This commit is contained in:
parent
d319a68bde
commit
c4e794498e
@ -34,7 +34,7 @@
|
||||
(require 'ol)
|
||||
(require 'org-element)
|
||||
|
||||
(defun org-link-conlang-open (path arg)
|
||||
(defun org-link-conlang-open (path _arg)
|
||||
"Open a conlang dictionary link.
|
||||
PATH is the path to a word or a language, as a string."
|
||||
(let* ((destructured-path (split-string path ":"))
|
||||
@ -86,6 +86,15 @@ containing the export paramenters."
|
||||
(if (not desc)
|
||||
(format "@uref{%s}" generic-uri)
|
||||
(format "@urif{%s, %s}" generic-uri desc)))
|
||||
(`conlang-md
|
||||
(format "<Dictionary lang=\"%s\" %s%s/>"
|
||||
language
|
||||
(if word
|
||||
(format "word=\"%s\" " word)
|
||||
"")
|
||||
(if desc
|
||||
(format "desc=\"%s\" " desc)
|
||||
"")))
|
||||
(_ generic-uri))))
|
||||
|
||||
(org-link-set-parameters "conlang"
|
||||
|
Reference in New Issue
Block a user