-
-
Couldn't load subscription status.
- Fork 168
Description
Django templates usually also use the file extension .html. While inside those files the HTML comments (<!-- … -->) do work, if a projects has multiple template snippets for each snippet the REUSE header would be printed in the HTML sent to the user agent.
I would suggest to add an DjangoCommentStyle that can be selected for reuse annotate. Django template comments can be written in:
- single line:
{# … #} - multi line:
{% comment %} … {% endcomment %}
I'm not sure what is preferable, to use the line comments multiple times, or the multi line comment block?
{% comment %}
SPDX-FileCopyrightText: …
SPDX-License-Identifier: …
{% endcomment %}
…
{# SPDX-FileCopyrightText: … #}
{# #}
{# SPDX-License-Identifier: … #}
…
Django templates can start with an {% extends "…" %} tag for extending from a different template file. This tag has to be always the first line a template, so in this case the REUSE header would need to be after that line, this could probably achieved with the shebang setting in the CommentStyle?
I'm happy to prepare a PR if this would be included.