Hi, I have written some code to automatically dedent “else” clauses if the indentation is higher than the corresponding “if” statement by using an updateListener and determining if the line is an “else”. However I was wondering if it could be achieve via an IndentNodeProp as the language I am supporting is multilingual and hence with the updateListener approach I have to look for all possible translations of the word “else”. However, as we add more languages I have to edit the code to include their translation of the word “else”.
If I could do it with an indentNodeProp I would just have to attach the code to the ElseClause node and it would work for all languages added in the future. I tried to do it but couldn’t figure how how to dispatch the transaction when I attempted it from the IndentNodeProp as I don’t have access to the view.
Note, I am not able to match an else until the line has already been entered.