summaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/graphics.py
diff options
context:
space:
mode:
authorshadchin <[email protected]>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/python/Pygments/py3/pygments/lexers/graphics.py
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/graphics.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/graphics.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/graphics.py b/contrib/python/Pygments/py3/pygments/lexers/graphics.py
index 9f3e4a4431a..7e750c2868b 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/graphics.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/graphics.py
@@ -4,7 +4,7 @@
Lexers for computer graphics and plotting related languages.
- :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -407,7 +407,7 @@ class AsymptoteLexer(RegexLexer):
.. versionadded:: 1.2
"""
name = 'Asymptote'
- aliases = ['asymptote', 'asy']
+ aliases = ['asymptote', 'asy']
filenames = ['*.asy']
mimetypes = ['text/x-asymptote']
@@ -424,7 +424,7 @@ class AsymptoteLexer(RegexLexer):
],
'statements': [
# simple string (TeX friendly)
- (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
+ (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
# C style string (with character escapes)
(r"'", String, 'string'),
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
@@ -774,26 +774,26 @@ class PovrayLexer(RegexLexer):
(r'[0-9]+\.[0-9]*', Number.Float),
(r'\.[0-9]+', Number.Float),
(r'[0-9]+', Number.Integer),
- (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
+ (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
(r'\s+', Whitespace),
]
}
-
- def analyse_text(text):
- """POVRAY is similar to JSON/C, but the combination of camera and
- light_source is probably not very likely elsewhere. HLSL or GLSL
- are similar (GLSL even has #version), but they miss #declare, and
- light_source/camera are not keywords anywhere else -- it's fair
- to assume though that any POVRAY scene must have a camera and
- lightsource."""
- result = 0
- if '#version' in text:
- result += 0.05
- if '#declare' in text:
- result += 0.05
- if 'camera' in text:
- result += 0.05
- if 'light_source' in text:
- result += 0.1
-
- return result
+
+ def analyse_text(text):
+ """POVRAY is similar to JSON/C, but the combination of camera and
+ light_source is probably not very likely elsewhere. HLSL or GLSL
+ are similar (GLSL even has #version), but they miss #declare, and
+ light_source/camera are not keywords anywhere else -- it's fair
+ to assume though that any POVRAY scene must have a camera and
+ lightsource."""
+ result = 0
+ if '#version' in text:
+ result += 0.05
+ if '#declare' in text:
+ result += 0.05
+ if 'camera' in text:
+ result += 0.05
+ if 'light_source' in text:
+ result += 0.1
+
+ return result