I have some text like this
This is a {{text}} with { { {some {extra} unneeded {
{and ugly}} braces
}}}.
Is there a way to remove the extra unneeded parenthesis so that the result is
This is a {text} with {some {extra} unneeded
{and ugly} braces
}.
Or something like this, up to whitespace. I use smartparens
but I couldn't find anything there to resolve this (other than going through each extra pair and removing it).