AnonymerNiklasistanonym / Md2Anki

Convert Markdown formatted documents to anki decks
https://pypi.org/project/md2anki/
MIT License
6 stars 1 forks source link

Unrecognized assembly language code #22

Closed baldachin closed 1 year ago

baldachin commented 1 year ago

My code block contains assembly code and the following warning appears during conversion: WARNING md2anki.preprocessor: Default to text lexer (language='assembly', err=ClassNotFound("no lexer for alias ' assembly' found")) image

AnonymerNiklasistanonym commented 1 year ago

I'm not sure if you already tried it but maybe the short name asm instead of assembly works for your code. But maybe I'm missing something so if you have an example snippet or a more detailed description it would help.

I'm not really familiar with this project but I'm pretty sure it just uses the Pygments project. Here is a list of all lexers/languages that should thus be supported and their keywords/names: https://pygments.org/docs/lexers/#lexers-for-assembly-languages

AnonymerNiklasistanonym commented 1 year ago

Even if this solves the problem I should probably add that link/information to the error message in case this problem occurs again (I remember having a similar problem with another language/id).

baldachin commented 1 year ago

Thanks, I've currently moved the work to mdankideck to complete it as I'm having more problems with it, should continue to try if I can get a solution to a couple of the other issues.

baldachin commented 1 year ago

Thanks, I've found that the correct language identifier is nasm and the modification has solved the problem.