Sublime-CoolFormat
Sublime-CoolFormat copied to clipboard
CoolFormat deletes text if syntax does not match any presets.
If you attempt to run CoolFormat on a file whose syntax does not match any of the supported languages, all text in the document will be deleted.
This can easily be resolved by implementing a simple verification process:
activeSyntax = view.settings().get( "syntax" )- check the found syntax against an array of valid syntaxes
- return if no matches are found
Fixed it in https://github.com/akof1314/Sublime-CoolFormat/commit/837c83b775de2b0bf83ae278dcfba92505780dcb