"--" string is not permitted inside a comment. So I suggest to treat "-" as a special character. That would make it possible to use "Characters to Entities" to escape such strings. That's the goal of using "Characters to Entites", to convert characters that make problems in parsing into correct xml code.
I have 3 ideas, but don't know which would be best for the plugin:
1. treat "-" always as a special char and replace it with -
2. treat "-" as special only after another "-"
3. treat "-" as special if configured so
In any case Entites to Characters should replace the entity with original character.
Without this functionality a common problem I meet is ant scripts with exec call, with arguments like --output. These commands are impossible to comment out.
I think this is a very special case.
I propse you use a macro to set a comment and remove it.
Set the macro:
It will put the current selection (just one) into a comment and replace every "--" with "--"
The next one reverts that change by removing the enclosing comment (or the comment to the left of the cursor) and replace "-%45;" with "--"
I hope this helps.
Proposal for this featuer request: Close -> won't fix.
Last edit: Skeeve 2017-10-30
Hi Skeeve, I just added you as a developer so you can close tickets, and
assign things to yourself.
Thanks for helping out!
--Alan