Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Twig auto-indent not working for HTML elements
This commit also includes a naive attempt to add auto-indent support for Twig tags. It does not work well in the following scenarios: * when the cursor is after a ending block token: indentation should not be added but is for now **Current** ``` {% if true %} {% endif %} <CURSOR> ``` **Wished** ``` {% if true %} {% endif %} <CURSOR> ``` * when we press return after an `{% else %}` statement: indentation for the else statement should be removed instead of adding a new indent on the new line **Current** ``` {% if true %} {% else %} <CURSOR> {% endif %} ``` **Wished** ``` {% if true %} {% else %} <CURSOR> {% endif %} ``` More advanced RegExp could be used to handle those cases.
- Loading branch information