Fix PercentLiteralDelimiters auto-correct for regular expression with interpolation

This is a fix for the problem when auto-correcting regular expression with interpolation reported in #877.

I'm not very pleased with the source extraction methods (`contents` and `source`). I would really appreciate hints to a better way of doing that.