diff options
| author | monster <[email protected]> | 2022-07-07 14:41:37 +0300 |
|---|---|---|
| committer | monster <[email protected]> | 2022-07-07 14:41:37 +0300 |
| commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
| tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/python/Pygments/py3/pygments/lexers/asc.py | |
| parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
fix ya.make
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/asc.py')
| -rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/asc.py | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/asc.py b/contrib/python/Pygments/py3/pygments/lexers/asc.py deleted file mode 100644 index 18d779f6cb8..00000000000 --- a/contrib/python/Pygments/py3/pygments/lexers/asc.py +++ /dev/null @@ -1,51 +0,0 @@ -""" - pygments.lexers.asc - ~~~~~~~~~~~~~~~~~~~ - - Lexer for various ASCII armored files. - - :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" -import re - -from pygments.lexer import RegexLexer, bygroups -from pygments.token import Comment, Generic, Name, Operator, String, Whitespace - -__all__ = ['AscLexer'] - - -class AscLexer(RegexLexer): - """ - Lexer for ASCII armored files, containing `-----BEGIN/END ...-----` wrapped base64 data. - - .. versionadded:: 2.10 - """ - name = 'ASCII armored' - aliases = ['asc', 'pem'] - filenames = [ - '*.asc', # PGP; *.gpg, *.pgp, and *.sig too, but those can be binary - '*.pem', # X.509; *.cer, *.crt, *.csr, and key etc too, but those can be binary - 'id_dsa', 'id_ecdsa', 'id_ecdsa_sk', 'id_ed25519', 'id_ed25519_sk', 'id_rsa', # SSH private keys - ] - mimetypes = ['application/pgp-keys', 'application/pgp-encrypted', 'application/pgp-signature'] - - flags = re.MULTILINE - - tokens = { - 'root': [ - (r'\s+', Whitespace), - (r'^-----BEGIN [^\n]+-----$', Generic.Heading, 'data'), - (r'\S+', Comment), - ], - 'data': [ - (r'\s+', Whitespace), - (r'^([^:]+)(:)([ \t]+)(.*)', bygroups(Name.Attribute, Operator, Whitespace, String)), - (r'^-----END [^\n]+-----$', Generic.Heading, 'root'), - (r'\S+', String), - ], - } - - def analyse_text(text): - if re.search(r'^-----BEGIN [^\n]+-----\r?\n', text): - return True |
