louietan / anki-editor

Emacs minor mode for making Anki cards with Org
700 stars 87 forks source link

Fix incorrect exporting of underlined text #34

Open vanzef opened 5 years ago

vanzef commented 5 years ago

By default (and I don't know the easy way to change this behavior) org-mode exports underlined text into HTML as <span class="underline">some text</span> which results into ignoring underlining by Anki.

I see two solutions to the problem:

  1. Do some black magic with regular expressions and various org-mode hooks and filters (as in 12.17 Advanced configuration)
  2. Do some changes to the style sheet of a note type i.e. adding the following snippet
    .underline {
    text-decoration: underline;
    }

I think the second way is preferable (since writing down the proper regex might be burdensome) and should be added to the documentation of anki-editor.

P.S. Thanks for the great minor-mode!