diff options
| author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2021-08-03 23:09:00 -0400 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-08-05 05:57:36 +0200 |
| commit | e79ae5c317c4fe94c9ed9593309c07d9cf3bbbdf (patch) | |
| tree | d5a3826b3660f65f21730fed7eaf6a35ae0715d8 /django/template | |
| parent | ab16507f192d6da371f7165ecb159764a807cadc (diff) | |
Fixed #32986 -- Removed unneeded str.find() call in Lexer.create_token().
Unnecessary since 47ddd6a4082d55d8856b7e6beac553485dd627f7.
Diffstat (limited to 'django/template')
| -rw-r--r-- | django/template/base.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/django/template/base.py b/django/template/base.py index 58fdae31e3..ffd851ac39 100644 --- a/django/template/base.py +++ b/django/template/base.py @@ -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) |
