Le 22/10/23 à 14h20, Slavko a écrit : > Dňa 22. októbra 2023 13:51:21 UTC používateľ "Denis Bitouzé" > <denis.bito...@gmail.com> napísal: > >> │ def setup(app): >> │ from acetexlexer import AceTexLexer >> │ app.add_lexer('xlatex', acetexlexer.AceTexLexer) >> └──── > > I cannot comment lexer implementation itself, i never did > own, but i use: > > def setup(app): > from pylogrotate.lexer import LogrotateLexer > app.add_lexer('logrotate', LogrotateLexer()) > > Note the "()" at end, to pass instance (object), you are > passing class.
Unfortunaltely, that doesn't work either. And I precisely didn't use these parentheses because of : ┌──── │ https://github.com/sphinx-doc/sphinx/issues/9544#issuecomment-898865061 └──── where tk0miya said: ┌──── │ add_lexer() takes a Lexer class instead of an instance. Could you pass │ the AdaLexer as a class? └──── > And as you directly imported "AceTexLexer", you don't need to use > "acetexlexer.AceTexLexer", just "AceTexLexer()". Ah, thanks. Regards. -- Denis -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/87pm16n225.fsf%40example.com.