Skip to content

django templates are being detected as htmlangular #16375

@CraziestOwl

Description

@CraziestOwl

Steps to reproduce

The file type is identified incorrectly as htmlangular, if there is a line containing {{ }} before an line with {% %}:
For example:

<title>{{ title }}</title>
{% block content %}
<h1>{% if user.is_authenticated %}Hello, {{ user.username }}.{% endif %}</h1> 
{% endblock %}

If the order is line with {% %} but without {{ }} first and then {{ }} the file type will be identified correctly as htmldjango.

Expected behaviour

The file type to be htmldjango

Version of Vim

9.1.984

Environment

OS: Debian 12
terminal: konsole 23.08.5
shell: bash 5.2.15

Logs and stack traces

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions