autoclose inside strings

Hi,

I’m not sure why, I can’t seem to have the closebracket addon close {} inside a string.

I want it in the html mode, but it doesn’t auclose.

So I tested in the autoclosebrackets demo (js) but it doesn’t work there either.

Is that a bug or must I use an option (I din’t find any except pairs and explode)?

Mickaël

The closebrackets addon has a bunch of scary heuristics to try and decide which behavior is appropriate when. I think you were typing the bracket right in front of the closing quote character, which was indeed not working. I’ve adjusted the code in this patch to fix that.

If that was not the problem you were having, let me know. (Autoclosing when typing inside of or before a word intentionally does not work.)

PS thanks for posting the first real question on here!

Ah yes, I did exactly that:

  • insert a quote " -> autoclosed to “”, with the cursor inside the quotes.

  • type { which is not converted to {}

I just check, if I first insert a space " " then put the cursor before the space, { is autoclosed.

Thanks!