Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff docs/details-filter.rst @ 166:6a7dace0141e
Also implement filters to replace tokens in a token stream: TokenReplaceFilter and ErrorToGenericErrorTokenFilter
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 08 May 2026 23:54:06 +0200 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/details-filter.rst Fri May 08 23:54:06 2026 +0200 @@ -0,0 +1,31 @@ +.. -*- coding: utf-8; indent-tabs-mode: nil; -*- + +.. _details-filter: + +******** + Filter +******** + +ErrorToGenericErrorTokenFilter +============================== + +:Name: errortogenericerror +:Filter Options: none + +Replace all :py:class:`pygments.token.Token.Error` tokens in a stream by +:py:class:`pygments.token.Token.Generic.Error` tokens. + + +TokenReplaceFilter +================== + +:Name: tokenreplace +:Required Filter Options: + **token_from** + **Type:** :py:class:`str` or :py:class:`pygments.token.Token` + + **token_to** + **Type:** :py:class:`str` or :py:class:`pygments.token.Token` + +Replace all token types given in `token_from` by the token type given +in `token_to`.
