##// END OF EJS Templates
Style fix for some comments.
chebee7i -
Show More
@@ -351,8 +351,7 b' class IPythonConsoleLexer(Lexer):'
351 # To reduce the number of regex match checks, we have multiple
351 # To reduce the number of regex match checks, we have multiple
352 # 'if' blocks instead of 'if-elif' blocks.
352 # 'if' blocks instead of 'if-elif' blocks.
353
353
354 ### Check for possible end of input
354 # Check for possible end of input
355 ###
356 in2_match = self.in2_regex.match(line)
355 in2_match = self.in2_regex.match(line)
357 in2_match_rstrip = self.in2_regex_rstrip.match(line)
356 in2_match_rstrip = self.in2_regex_rstrip.match(line)
358 if (in2_match and in2_match.group().rstrip() == line.rstrip()) or \
357 if (in2_match and in2_match.group().rstrip() == line.rstrip()) or \
@@ -368,8 +367,7 b' class IPythonConsoleLexer(Lexer):'
368 insertion = (0, Generic.Prompt, line)
367 insertion = (0, Generic.Prompt, line)
369 return mode, code, insertion
368 return mode, code, insertion
370
369
371 ### Check for output prompt
370 # Check for output prompt
372 ###
373 out_match = self.out_regex.match(line)
371 out_match = self.out_regex.match(line)
374 out_match_rstrip = self.out_regex_rstrip.match(line)
372 out_match_rstrip = self.out_regex_rstrip.match(line)
375 if out_match or out_match_rstrip:
373 if out_match or out_match_rstrip:
@@ -385,8 +383,7 b' class IPythonConsoleLexer(Lexer):'
385 return mode, code, insertion
383 return mode, code, insertion
386
384
387
385
388 ### Check for input or continuation prompt (non stripped version)
386 # Check for input or continuation prompt (non stripped version)
389 ###
390 in1_match = self.in1_regex.match(line)
387 in1_match = self.in1_regex.match(line)
391 if in1_match or (in2_match and self.mode != 'tb'):
388 if in1_match or (in2_match and self.mode != 'tb'):
392 # New input or when not in tb, continued input.
389 # New input or when not in tb, continued input.
@@ -401,8 +398,7 b' class IPythonConsoleLexer(Lexer):'
401 insertion = (0, Generic.Prompt, line[:idx])
398 insertion = (0, Generic.Prompt, line[:idx])
402 return mode, code, insertion
399 return mode, code, insertion
403
400
404 ### Check for input or continuation prompt (stripped version)
401 # Check for input or continuation prompt (stripped version)
405 ###
406 in1_match_rstrip = self.in1_regex_rstrip.match(line)
402 in1_match_rstrip = self.in1_regex_rstrip.match(line)
407 if in1_match_rstrip or (in2_match_rstrip and self.mode != 'tb'):
403 if in1_match_rstrip or (in2_match_rstrip and self.mode != 'tb'):
408 # New input or when not in tb, continued input.
404 # New input or when not in tb, continued input.
@@ -417,16 +413,14 b' class IPythonConsoleLexer(Lexer):'
417 insertion = (0, Generic.Prompt, line[:idx])
413 insertion = (0, Generic.Prompt, line[:idx])
418 return mode, code, insertion
414 return mode, code, insertion
419
415
420 ### Check for traceback
416 # Check for traceback
421 ###
422 if self.ipytb_start.match(line):
417 if self.ipytb_start.match(line):
423 mode = 'tb'
418 mode = 'tb'
424 code = line
419 code = line
425 insertion = None
420 insertion = None
426 return mode, code, insertion
421 return mode, code, insertion
427
422
428 ### All other stuff...
423 # All other stuff...
429 ###
430 if self.mode in ('input', 'output'):
424 if self.mode in ('input', 'output'):
431 # We assume all other text is output. Multiline input that
425 # We assume all other text is output. Multiline input that
432 # does not use the continuation marker cannot be detected.
426 # does not use the continuation marker cannot be detected.
General Comments 0
You need to be logged in to leave comments. Login now