Add a format_selection_only option
Minor change to variable names
Describe what `isTypeAllowed` does
Don't run regexes if there's no file path