comment-fold stopped working sometime between 4.7 and 5.13.2

It’s been awhile since I updated CodeMirror in my app (I know, shame on me, I’ve gone from 4.7 to 5.13.2 (the latest version available on webjars)). Somewhere along the way comment-fold stopped working for me. I popped in the 4.7 version of just that file and still doesn’t work (which doesn’t surprise me, given what was changed in that file itself between 4.7 and 5.13.2).

Is there something I need to change in my custom mode, which is based on the groovy mode? I also tried using the stock groovy mode and it doesn’t work there either, but neither does brace-fold, which DOES work in my custom mode.

To be honest, I’ve forgotten how all this works. I did all the custom work back at version 3 and have just been updating to newer version from time to time. This is the first time anything has “broken”. Please forgive me for what I’m sure is something simple I’m overlooking.

Thanks for any help!

Did you try upgrading to 5.16.0? There was a bug where the comment folding addon didn’t pick up comments starting in column 0 that was fixed recently.

Thanks Marijn!

I have not, but I just confirmed that if I don’t start the block in column 0 it picks it up properly, so I’m sure that’s it.

We deploy our app dependencies via webjars.org. It’s just such a simpler way of including all the third partly libraries we use. So even though I bet you’re right that 5.16 fixes it, I don’t really want to add a separate CodeMirror dependency, since I don’t need any of the newer updates. It’s more of a desire to get current again than anything else.

I don’t know how libraries get updated at webjars. Maybe you could influence them to pick up 5.16?

Anyway, thanks very much for your quick reply!

I publish to NPM, and that’s it. Worrying about other distribution channels is just too much of a time sink, so I’m afraid you’re going to have to do the influencing yourself there.

Well guess what? So I go to webjars.org to see if they list a policy for requesting updates, and I notice that they have an npm tab! So I change my maven pom to point to that and voila` I’ve got 5.16 installed and verified that comment-fold is working!!

Thanks Marijn!!