Skip to content

Commit

Permalink
Fix bug detecting {# fmt:off #} and {# fmt:on #} tags
Browse files Browse the repository at this point in the history
Ref. #33
  • Loading branch information
JaapJoris committed May 28, 2021
1 parent 410a5b6 commit c7a439d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion djhtml/modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def create_token(self, raw_token, src):
name = comment.group(1)
if name == "fmt:off":
token = Token.Open(raw_token, kind)
self.next_mode = Comment(r"\{% *fmt:on.*?%\}", self, kind)
self.next_mode = Comment(r"\{# *fmt:on.*?#\}", self, kind)

return token

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = djhtml
version = 1.4.3
version = 1.4.4
description = Django/Jinja2 template indenter
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit c7a439d

Please sign in to comment.