Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff pygments_lexer_pseudocode2/__init__.py @ 27:bf13850f21fb
Use the more correct "Token.Text.Whitespace" for whitespace instead of "Token.Text"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 21 Apr 2026 01:22:43 +0200 |
| parents | 92576c1b05d9 |
| children |
line wrap: on
line diff
--- a/pygments_lexer_pseudocode2/__init__.py Tue Apr 21 01:07:20 2026 +0200 +++ b/pygments_lexer_pseudocode2/__init__.py Tue Apr 21 01:22:43 2026 +0200 @@ -23,7 +23,7 @@ import re from pygments.lexer import RegexLexer, include -from pygments.token import Punctuation, Text, Comment, Operator, Keyword, Name, String, Number +from pygments.token import Punctuation, Whitespace, Comment, Operator, Keyword, Name, String, Number class PseudocodeLexer2(RegexLexer): @@ -78,7 +78,7 @@ include('core'), (r'(?i)[a-zéàùçèÉÀÙÇÈ][a-z0-9éàùçèÉÀÙÇÈ_]*', Name.Variable), include('numbers'), - (r'[\s]+', Text) + (r'[\s]+', Whitespace) ], 'core': [ # Statements (r'(?i)\b(debut|début|fin|si|alors|sinon|fin[_ ]si|tant[ _]que|tantque|fin[ _]tantque|faire|répéter'
