Skip to main content
10 events
when toggle format what by license comment
Mar 9, 2022 at 21:58 comment added phils [[{] being a character alternative [...] matching either [ or {. As a START pattern, hideshow will look for that, and then find the balancing end-point for that, which should be a matching ] or } as matched by []}]. I'm not surprised if invalid JSON causes issues, but "garbage in, garbage out" as they say! I don't imagine you're expecting Emacs to fix invalid data :)
Mar 9, 2022 at 19:33 comment added ceving They work as long as the JSON data is valid. If the buffer contains miss-balanced braces, they will be collapsed to this: [...}.
Mar 9, 2022 at 19:26 vote accept ceving
Mar 9, 2022 at 19:26 comment added ceving I still do not understand why, but the regexps [[{] and []}] seem to work. Thank you!
Mar 8, 2022 at 20:37 history edited phils CC BY-SA 4.0
deleted 8 characters in body
Mar 8, 2022 at 20:26 comment added phils I misinterpreted some things sorry, but those docs do provide for matching multiple characters. I'll update the answer.
Mar 8, 2022 at 14:42 comment added ceving I do not understand, how this answers the question. I see I can change START and END. But I do not see, how to specify multiple corresponding STARTs and ENDs.
Mar 8, 2022 at 12:10 history edited phils CC BY-SA 4.0
added 497 characters in body
Mar 8, 2022 at 12:03 history edited phils CC BY-SA 4.0
added 497 characters in body
Mar 8, 2022 at 11:57 history answered phils CC BY-SA 4.0