mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-23 20:25:49 +00:00
closes #31
This commit is contained in:
parent
c3b21323ea
commit
310e85ba33
3 changed files with 11 additions and 4 deletions
|
|
@ -12,7 +12,7 @@
|
|||
project = "djlint"
|
||||
copyright = "2021, Riverside Healthcare"
|
||||
author = "Christopher Pickering"
|
||||
release = "0.4.5"
|
||||
release = "0.4.6"
|
||||
version = release
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
0.4.6
|
||||
-----
|
||||
- fix bug `#31 <https://github.com/Riverside-Healthcare/djLint/issues/31>`_
|
||||
|
||||
0.4.5
|
||||
-----
|
||||
- Added best practices to docs
|
||||
|
|
|
|||
|
|
@ -120,16 +120,19 @@ def compress_html(html: str, config: Config) -> str:
|
|||
r"\1\3\4",
|
||||
html,
|
||||
)
|
||||
|
||||
print(html)
|
||||
print(
|
||||
fr"(<({config.single_line_html_tags})[ ][^>\n]{{,80}}>)\s*([^<\n]{{,80}})\s*?(</(\2)>)"
|
||||
)
|
||||
html = re.sub(
|
||||
re.compile(
|
||||
fr"(<({config.single_line_html_tags})[ ][^\n]{{,80}}>)\s*([^<\n]{{,80}})\s*?(</(\2)>)",
|
||||
fr"(<({config.single_line_html_tags})[ ][^>\n]{{,80}}>)\s*([^<\n]{{,80}})\s*?(</(\2)>)",
|
||||
re.IGNORECASE | re.MULTILINE | re.DOTALL | re.VERBOSE,
|
||||
),
|
||||
r"\1\3\4",
|
||||
html,
|
||||
)
|
||||
|
||||
print(html)
|
||||
html = re.sub(
|
||||
re.compile(
|
||||
rf"({{%-?[ ]*?({config.single_line_template_tags})[^\n]{{,30}}%}})\s*([^%\n]{{,50}})\s*?({{%-?[ ]+?end(\2)[ ]*?%}})",
|
||||
|
|
|
|||
Loading…
Reference in a new issue