aider icon indicating copy to clipboard operation
aider copied to clipboard

total_pages|int|default(1); per_page|int coding formats generate lint errors

Open liviuolos opened this issue 1 year ago • 0 comments

Issue

total_pages|int|default(1) coding formats generate lint replacement errors

also sometimes this leads to aider to get stuck.

Examples of failing lint replacement generating endless loops:

37█ <option value="10" {% if per_page|int == 10 %}selected{% endif %}>10 38█ <option value="25" {% if per_page|int == 25 %}selected{% endif %}>25 39█ <option value="50" {% if per_page|int == 50 %}selected{% endif %}>50 118█ {% if total_pages|int > 1 %} 120█ {% if current_page|int > 1 %} 129█ <a href="?page={{ p }}&per_page={{ per_page }}" {% if p|int == current_page|int %}class="active"{% endif %}>{{ p }} 132█ {% if current_page|int < total_pages|int %} 129█ <a href="?page={{ p }}&per_page={{ per_page|default(10) }}" {% if p|int == current_page|default(1)|int %}class="active"{% endif %}>{{ p }} 132█ {% if current_page|int|default(1) < total_pages|int|default(1) %}

Search replace sections: <<<<<<< SEARCH <a href="?page={{ p }}&per_page={{ per_page|default(10) }}" {% if p|int == current_page|default(1)|int %}class="active"{% endif %}>{{ p }}

         <a href="?page={{ p }}&per_page={{ per_page|int|default(10) }}" {% if p|int == current_page|int|default(1) %}class="active"{% endif %}> 

p }}

REPLACE

Fix any errors below, if possible.

See relevant lines below marked with █.

templates\vulnerabili.html: ...⋮... 2│ ...⋮... 9│ ...⋮... 29│

...⋮... 34│
35│ 36│ 41│
42│
...⋮... 115│
116│
117│ 118█ {% if total_pages|default(1)|int > 1 %} 119│