stolksdorf / CleanCSS

CSS beautifier and sorter for Sublime text 2
55 stars 7 forks source link

Sublime Text 3 Support #5

Closed serkanyersen closed 10 years ago

serkanyersen commented 10 years ago

This is already a very compatible code, I only needed to change map and filter return types, python3 returns map object instead of list. this change shouldn't break the ST2 functionality but I haven't tested there.

ajitam commented 10 years ago

When I try to run it in ST3 I get:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "/Users/john/Library/Application Support/Sublime Text 3/Packages/CleanCSS/CleanCSS.py", line 44, in run
    self.formatRegion(cssRule)
  File "/Users/john/Library/Application Support/Sublime Text 3/Packages/CleanCSS/CleanCSS.py", line 77, in formatRegion
    result = self.createPartitionedRules(result, results[1])
  File "/Users/john/Library/Application Support/Sublime Text 3/Packages/CleanCSS/CleanCSS.py", line 165, in createPartitionedRules
    result = [filterAndSortRules(lines,rl) for rl in ruleLists]
TypeError: 'NoneType' object is not iterable

I noticed that spaces (rule alignment) are added