kudago / jinja2-tmbundle

Jinja2 Syntax Support for TextMate and Sublime Text
18 stars 9 forks source link

[Bug] Not highlighted Jinja2 syntax in HTML attributes #5

Open Kristinita opened 7 years ago

Kristinita commented 7 years ago

1. Summary

Jinja2 syntax not highlighted in attributes of HTML tags like in other places of HTML document.

2. Expected behavior

Part of my page.html file:

    <link rel="stylesheet" href="{{SITEURL}}/themes/sashapelican/statica/css/general/image_{{page.iconleftorright}}.css">
    <link rel="stylesheet" type="text/css" href="{{SITEURL}}/themes/sashapelican/statica/bower-components/rainbow/themes/css/rainbow.css">
    <!-- Открытие ссылок в новой вкладке -->
    <base target="_blank">
</head>

<body>
    <!-- Бэкграунд aside -->
    <aside class="sidebar" style="background-image: url({{SITEURL}}/themes/sashapelican/statica/images/aside/{{page.sashaicon}}.jpg)">
        <div class="cover">
            <div class="cover-text">
                <!-- Заголовок aside -->
                <h1>{{page.pagetitle}}</h1>
            </div>
        </div>
    </aside>
    <!-- Текст -->
    <main class="content-wrapper">
        <h1 class="SashaHeader">{{page.pagetitle}}</h1> {{page.content}}
    </main>
</body>

Expected

See {{page.pagetitle}} and {{page.content}}.

3. Actual behavior

See {{SITEURL}} and {{page.sashaicon}}.

Scopes for {{SITEURL}} and {{page.sashaicon}} It is the same as in the near text.

4. Steps to reproduce

The problem is reproduced for me in a version of Sublime Text without plugins and user settings.

I install Jinja2 via Package Control → I set Jinja2/Syntaxes/HTML (Jinja2) syntax for HTML files with Jinja2 templates → I open my page.html file → I get actual behavior.

5. Environment

Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Sublime Text: Build 3126

Thanks.

everyonesdesign commented 7 years ago

@Kristinita Thank you very much for your report, I'll try to research the issue.