mirror of
https://github.com/django/django.git
synced 2025-03-10 17:32:41 +00:00
Fixed #32986 -- Removed unneeded str.find() call in Lexer.create_token().
Unnecessary since 47ddd6a4082d55d8856b7e6beac553485dd627f7.
This commit is contained in:
parent
ab16507f19
commit
e79ae5c317
@ -387,9 +387,7 @@ class Lexer:
|
||||
self.verbatim = 'end%s' % block_content
|
||||
return Token(TokenType.BLOCK, block_content, position, lineno)
|
||||
elif token_start == COMMENT_TAG_START:
|
||||
content = ''
|
||||
if token_string.find(TRANSLATOR_COMMENT_MARK):
|
||||
content = token_string[2:-2].strip()
|
||||
content = token_string[2:-2].strip()
|
||||
return Token(TokenType.COMMENT, content, position, lineno)
|
||||
else:
|
||||
return Token(TokenType.TEXT, token_string, position, lineno)
|
||||
|
Loading…
x
Reference in New Issue
Block a user