From 3b278a63d7249459e26bfd91f1f67d4ffae48f40 Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Thu, 18 Jul 2024 16:25:49 -0400 Subject: [PATCH] adjust djlint config to add custom tags used by django-cotton (#230) --- CHANGELOG.md | 4 ++++ src/django_twc_project/pyproject.toml.jinja | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b187c78..8634214b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Changed + +- Added `custom_html = "c-\\w+"` to the `djlint` config, to support the HTML tags produced from our custom [Django Cotton](https://django-cotton.com) components. + ## [2024.34] ### Changed diff --git a/src/django_twc_project/pyproject.toml.jinja b/src/django_twc_project/pyproject.toml.jinja index 5414dd46..ab3d7886 100644 --- a/src/django_twc_project/pyproject.toml.jinja +++ b/src/django_twc_project/pyproject.toml.jinja @@ -130,6 +130,7 @@ django_settings_module = "{{ module_name }}.settings" blank_line_after_tag = "endblock,endpartialdef,extends,load" blank_line_before_tag = "block,partialdef" custom_blocks = "partialdef" +custom_html = "c-\\w+" ignore = "H031" # Don't require `meta` tag keywords indent = 2 profile = "django"