-
-
Notifications
You must be signed in to change notification settings - Fork 167
Description
Just from reading the readme it sounds like this might be possible using the pre_hook, but I'm not sure exactly how I'd go about it.
I have copied the text below from my kommentary request for the same functionality (b3nj5m1n/kommentary#67)
Lua supports semi-arbitrary multiline comment strings in the form of matching numbers of equals signs. Meaning --[==[, --[===[, and --[=[ will only end the comment when it encounters ]==], ]===], and ]=] respectively.
It would be a great idea to match an opening regex like --\[\(=*\)\[ (or --\[(=*)\[ in PCRE style just to make sure it's clear) to the closing ]\1] (using the capture group from the opening regex to guarantee the same number of =)
This may not be as important when creating the comments, but is important to effectively uncomment them.