intellij-rainbow-brackets
intellij-rainbow-brackets copied to clipboard
Jinja2 Mis-Paired Template Blocks
Have you checked the issues and discussions to ensure there are no duplicates?
Yes
Your programming languages
Python, Flask server with Jinja2
Free or paid?
Paid users
Expected Behavior
Hi there, I am happy to see that rainbow brackets is supporting Jinja2 templates! The highlight strategy is awesome, but it should be able to pair each {% ... %}
blocks accordingly.
Current Behavior
Problem occurs with the color highlighting when there is an extends
block at the very beginning. It is messing up with the order for the whole file scope. See below:
Code snippet for reproduce
{% extends 'base.html' %}
{% block title %}Setup Basics{% endblock %}
{% block header %}{{ session['job'] }}{% endblock %}
{% block status %}
<div>
<img src="{{ url_for('static', filename='setup/status-bar-1.svg') }}" alt="Status Bar">
</div>
{% endblock %}
{% block content %}
<form method="post">
<label>Marking target</label>
<input type="text" name="filename" id="filename" value="{{ request.form['filename'] }}"
placeholder="Filename" required>
<label>Compile settings</label>
<input type="text" name="cArgs" id="cArgs" value="{{ request.form['cArgs'] }}"
placeholder="Command line arguments" required>
</form>
{% endblock %}
Your Environment
PyCharm 2023.3.2 (Professional Edition) Build #PY-233.13135.95, built on December 19, 2023 Licensed to Yuhan Zhang Subscription is active until September 26, 2024. For educational use only. Runtime version: 17.0.9+7-b1087.9 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 14.2.1 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Metal Rendering is ON Registry: debugger.new.tool.window.layout=true ide.experimental.ui=true Non-Bundled Plugins: com.markskelton.one-dark-theme (5.9.0) com.intellij.plugins.vscodekeymap (233.11799.188) name.kropp.intellij.makefile (233.13135.65) com.kagof.pokeprogress (2.1.1) izhangzhihao.rainbow.brackets (2024.1.0-233) com.intellij.ml.llm (233.13135.116) com.mallowigi (94.1.0) mobi.hsz.idea.gitignore (4.5.2)
Great! Everything is now working smoothly with this version.