Fixed #32986 -- Removed unneeded str.find() call in Lexer.create_token().

Unnecessary since 47ddd6a408.
This commit is contained in:
Chris Jerdonek 2021-08-03 23:09:00 -04:00 committed by Mariusz Felisiak
parent ab16507f19
commit e79ae5c317
1 changed files with 1 additions and 3 deletions

View File

@ -387,9 +387,7 @@ class Lexer:
self.verbatim = 'end%s' % block_content self.verbatim = 'end%s' % block_content
return Token(TokenType.BLOCK, block_content, position, lineno) return Token(TokenType.BLOCK, block_content, position, lineno)
elif token_start == COMMENT_TAG_START: elif token_start == COMMENT_TAG_START:
content = '' content = token_string[2:-2].strip()
if token_string.find(TRANSLATOR_COMMENT_MARK):
content = token_string[2:-2].strip()
return Token(TokenType.COMMENT, content, position, lineno) return Token(TokenType.COMMENT, content, position, lineno)
else: else:
return Token(TokenType.TEXT, token_string, position, lineno) return Token(TokenType.TEXT, token_string, position, lineno)