Closed Geczy closed 11 years ago
@Geczy, you've made changes to one file only, is there a way to get that only file by means of "Git for Windows"?
No idea, I don't use that software
Here's the one file only: https://raw.github.com/Geczy/SublimePhpTidy/05ff1d058aeb79f476398d41b4f2130a0d8a3298/php_tidy.py
@Geczy, right. It works for me, thanks.
@Geczy I'm afraid your version still doesn't work on my ST3 (on OS X).
But I'm going to merge it anyway as it seems to work for the two of you.
@welovewordpress What does ST3 console say when you try? Any errors?
@Geczy the issue seems to exist only if there are Unicode characters present in the php code.
Try to add an € symbol to your code - or any other unicode character and the console will show:
PhpTidy: Ok, this seems to be PHP
PhpTidy: buffer written to tmpfile: /tmp/phptidy-sublime-buffer.php
PhpTidy: calling script: /usr/bin/php "/Users/krok/Library/Application Support/Sublime Text 3/Packages/PhpTidy/wp-phptidy.php" replace "/tmp/phptidy-sublime-buffer.php"
Traceback (most recent call last):
File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
return self.run(edit)
File "/Users/krok/Library/Application Support/Sublime Text 3/Packages/PhpTidy/php_tidy.py", line 73, in run
newContent = fileHandle.read()
File "X/encodings/ascii.py", line 26, in decode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 14: ordinal not in range(128)
I think that might be because you have removed the .decode('utf-8')
fromt the last line... but I'm no good with python so if anyone would like to help with this I would greatly appreciate it.
kind regards,
Matt
Boy, they don't make it easy to load this. I downloaded that mater one but it says for ST2 not 3. Am I reading that wrong?
@Geczy, what commands should I use to download/apply this commit over git-cloned repo?