diff --git a/anki-editor.el b/anki-editor.el index 92a7add..a7a58d4 100644 --- a/anki-editor.el +++ b/anki-editor.el @@ -273,6 +273,9 @@ The result is the path to the newly stored media file." (defconst anki-editor--ox-export-ext-plist '(:with-toc nil :with-properties nil :with-planning nil :anki-editor-mode t)) +(defconst anki-editor--audio-extensions + '(".mp3" ".3gp" ".flac" ".m4a" ".oga" ".ogg" ".opus" ".spx" ".wav")) + (cl-macrolet ((with-table (table) `(cl-loop for delims in ,table collect @@ -372,8 +375,9 @@ The implementation is borrowed and simplified from ox-html." (org-html--format-image path attributes-plist info)) ;; Audio file. - ((string-suffix-p ".mp3" path t) - (format "[sound:%s]" path)) + ((cl-some (lambda (string) (string-suffix-p string path t)) + anki-editor--audio-extensions) + (format "[sound:%s]" path)) ;; External link with a description part. ((and path desc) (format "%s"