Skip to content

Commit

Permalink
fix(asc): use Whitespace instead of Text for whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed May 18, 2021
1 parent 2755cee commit 6e60767
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions pygments/lexers/asc.py
Expand Up @@ -10,7 +10,7 @@
import re

from pygments.lexer import RegexLexer, bygroups
from pygments.token import Comment, Generic, Name, Operator, Text, String
from pygments.token import Comment, Generic, Name, Operator, String, Whitespace

__all__ = ['AscLexer']

Expand All @@ -34,13 +34,13 @@ class AscLexer(RegexLexer):

tokens = {
'root': [
(r'\s+', Text),
(r'\s+', Whitespace),
(r'^-----BEGIN [^\n]+-----$', Generic.Heading, 'data'),
(r'\S+', Comment),
],
'data': [
(r'\s+', Text),
(r'^([^:]+)(:)([ \t]+)(.*)', bygroups(Name.Attribute, Operator, Text, String)),
(r'\s+', Whitespace),
(r'^([^:]+)(:)([ \t]+)(.*)', bygroups(Name.Attribute, Operator, Whitespace, String)),
(r'^-----END [^\n]+-----$', Generic.Heading, 'root'),
(r'\S+', String),
],
Expand Down
20 changes: 10 additions & 10 deletions tests/examplefiles/asc/id_ecdsa.output

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6e60767

Please sign in to comment.