-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Currently for regex replacements the user needs to escape the string.
e.g.
mapping = {
from = "adapterFactory.dispose\\(\\);"
to = "\\(\\(IDisposable\\) \\(adapterFactory\\)\\).dispose\\(\\);"
}This leads to easy faults and mistakes. A raw text flag could reduce the visual clutter. A solution to reduce this could be either Pattern.quote() or in the future a use of java 14 RawTextLiterals. Adding a flag in e.g. Mapping``boolean rawtext = false with default value false would keep the behavior of existing configs the same, but allows newer configs to profit from this change. A config entry with the new flag could like this. Increased readability and more fault tolerant.
mapping = {
rawText = true
from = "adapterFactory.dispose();"
to = "((IDisposable) (adapterFactory)).dispose();"
}wdyt about this improvement?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels