SQL Indenting with Double Parentheses

#1

When using CodeMirror with SQL as the mime type, if I have a double-closing parenthesis next to each other and hit return, it indents the new line to the start of the first open parenthesis. However, when there is a space between the two parentheses, the behavior is as I would expect. For example this:

SELECT Max(Round(column, 2))
FROM table;

…turns into this:

SELECT Max(Round(column, 2))
           FROM table;

How do I fix this auto-indenting to work correctly and go to the beginning of the new line if all prior parentheses are closed?

0 Likes

#2

I’m not seeing this on the sql mode demo page.

0 Likes

#3

Interesting…I will see if I can find my issue then. Thanks for pointing this out.

UPDATE: I just updated to the latest version of CodeMirror and the issue seems to be fixed now. Thank you.

0 Likes