Replies: 1 comment
-
Rich doesn't support passing in a lexer at the moment, but it could. Probably the "lexer" argument could accept a string or a Lexer instance. File a feature request if you would like that, or feel free to submit a PR if you would like to tackle it yourself. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any way for
rich
to use highlighted Pygment text? For example:You can see the highlighting is off since rich does not understand BBCode, and there doesn't seem to be a formatter that
rich
can understand. Reading the source code,rich
is not using any formatter provided bypygments
anyway.Why do I need that? I need a custom lexer, e.g.
but
rich
does not have the option to pass my custom lexer in forSyntax
, so I need to either usepygments
to render my text, or needrich
to support custom lexers.Beta Was this translation helpful? Give feedback.
All reactions