SublimeText / PackageDev

Tools to ease the creation of snippets, syntax definitions, etc. for Sublime Text.
MIT License
436 stars 83 forks source link

Improve SyntaxTestHighlighterListener header handling #145

Closed deathaxe closed 7 years ago

deathaxe commented 7 years ago

While debugging #144 I found the following possible (small) improvements for the event SyntaxTestHighlighterListener.

  1. The self.header is an object attribute and should be therefore declared in __init__()
  2. The self.header is queried first in __del__() to avoid reading settings, if we are not within a syntaxtest...
  3. Save 2 lines of code when checking syntaxtest file name
FichteFoll commented 7 years ago

Unfortunatey an interactive rebase flattened the merge, but this has been merged as a757851d49e4c9af45e6088eeeb9ca1f5d00d241.