Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b10273 commit f9953e4Copy full SHA for f9953e4
pygments/lexers/textfmts.py
@@ -194,8 +194,10 @@ def content_callback(self, match):
194
}
195
196
def analyse_text(text):
197
- return re.search(r'^([a-zA-Z][-_a-zA-Z]+)( +)([^ ]+)( +)'
198
- r'(HTTP)(/)(1\.[01]|2(?:\.0)?|3)(\r?\n|\Z)', text) is not None
+ return (re.search(r'^([a-zA-Z][-_a-zA-Z]+)( +)([^ ]+)( +)'
+ r'(HTTP)(/)(1\.[01]|2(?:\.0)?|3)(\r?\n|\Z)', text) is not None) or \
199
+ (re.search(r'^(HTTP)(/)(1\.[01]|2(?:\.0)?|3)( +)(\d{3})(?:( +)([^\r\n]*))?(\r?\n|\Z)',
200
+ text) is not None)
201
202
203
class TodotxtLexer(RegexLexer):
0 commit comments