Add support for mp3 sound links on cards (#26)
* Add support for mp3 sound links on cards Per https://apps.ankiweb.net/docs/manual.html#importing-media the format for audio files is `[sound:myaudio.mp3]`. This allow anki-editor to export mp3 links such as `[[file:myaudio.mp3]]`in a form that they play nice with anki cards.
This commit is contained in:
parent
d5007efab3
commit
b533c9899c
1 changed files with 4 additions and 0 deletions
|
@ -314,6 +314,10 @@ The implementation is borrowed and simplified from ox-html."
|
|||
link (plist-get info :html-inline-image-rules)))
|
||||
(org-html--format-image path attributes-plist info))
|
||||
|
||||
;; Audio file.
|
||||
((string-suffix-p ".mp3" path t)
|
||||
(format "[sound:%s]" path))
|
||||
|
||||
;; External link with a description part.
|
||||
((and path desc) (format "<a href=\"%s\"%s>%s</a>"
|
||||
(org-html-encode-plain-text path)
|
||||
|
|
Loading…
Reference in a new issue