diff options
-rw-r--r-- | pygments/lexers/javascript.py | 6 | ||||
-rw-r--r-- | pygments/lexers/typoscript.py | 4 |
2 files changed, 1 insertions, 9 deletions
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index 76b226c2..093e75e3 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -518,13 +518,9 @@ class TypeScriptLexer(RegexLexer): def analyse_text(text): if re.search('^(import.+(from\s+)?["\']|' - '(export)?\s*(interface|class|function)\s+)', + '(export\s*)?(interface|class|function)\s+)', text, re.MULTILINE): return 1.0 - else: - # Slightly lower than TypoScript, since we have more we can look - # for in TypeScript content. - return 0.8 class LassoLexer(RegexLexer): diff --git a/pygments/lexers/typoscript.py b/pygments/lexers/typoscript.py index d1f09d90..ff53490a 100644 --- a/pygments/lexers/typoscript.py +++ b/pygments/lexers/typoscript.py @@ -226,7 +226,3 @@ class TypoScriptLexer(RegexLexer): def analyse_text(text): if '<INCLUDE_TYPOSCRIPT:' in text: return 1.0 - else: - # Slightly higher than TypeScript, since there's less to rely - # on in TypoScript content. - return 0.9 |