VSCode handling unbalanced brackets within comments

25 views
Skip to first unread message

geor...@bigpond.net.au

unread,
Oct 14, 2021, 12:18:15 AM10/14/21
to Extempore

Ben

In Andrew’s extempore_lang.xtm

https://github.com/digego/extempore/blob/master/examples/core/extempore_lang.xtm

There is a comment at line 316 

        ;; so back to double for us :(

the unbalanced bracket throws the formatter of Visual Studio Code out of sync from that point in the file onwards. Code indenting  goes haywire.

Similarly some comments within example code or in Guides where brackets are balanced but the matching bracket is on a new line have the same effect. This often happens where the writer makes an “aside comment” within the text and the matching bracket occurs in the next line. I usually change these aside brackets to dashes when I find them.

I know it is a minor point and you have more than enough to do but I think the formatter/parser could be told to ignore brackets within commented-out text. I don't know how to do that.

Regards

George

Ben Swift

unread,
Oct 17, 2021, 7:56:51 PM10/17/21
to extemp...@googlegroups.com
Hi George

Ah, bummer. I've pushed a temporary fix, will think about a better one asap.

https://github.com/digego/extempore/commit/010ae8fa46fd66f020c7e379b7e0429d050a16c0

Cheers,
Ben
Reply all
Reply to author
Forward
0 new messages