Closed fitnr closed 12 years ago
Thanks @fitnr for your work. I'm confident now that we can do without a webservice (which I had in mind as a replacement for the native tidy version, not as a 3rd options).
I think to solve issue #14, it would still be neccessary to make the plugin prefer the native version over the php version.
This could be done by swapping the order of checks, or by implementing a user setting to force either version or by not only checking if php is found but to run tidy.php in a "selfcheck mode" which would just check if ! class_exists('Tidy') die(42)
or similar - just return an error value that could be recognized by the plugin as "ok, php is there, tidy.php is there, but the self check fails, so I will continue as if php could not be found."
But right now I seem to have another problem:
GitHub tells me that this pull request cannot be automatically merged! I have not seen that message before and I wonder what caused this as much as what I should do next. I don't see any button for "merge manually" or something. Could you give me any advice on this matter?
@fitnr I just had a look on https://github.com/fitnr/SublimeHtmlTidy to check if I might just take the whole content of all changed files and copy it to this repo - but your latests changes are not there.
If you don't have an answer to my question regarding manually merging a pull request on GitHub, maybe you could just update your repo to the latest version and I'll take it from there... just an idea.
@fitnr ok, I#ve managed to educate myself about resolving conflicts when merging... the master branch should be up to date now. please try to sync with the master before you send a push request. (as far as i understood it, that should help to avoid conflicts...)
Sorry, I thought I had, but I may have accidently fetched my fork, not this repo.
Plugin now passes arguments as either a list or a string, depending on the type of tidy being used.
bundled tidy.exe: recieves list of arguments. (This is first choice on Windows, only windows) tidy PHP library and tidy in PATH: recieve string of arguments. (OS X has an old tidy in its path, PHP is preferred)
If you'd prefer to try the exe on all platforms (including linux), remove the 'if' statement on tidy_html.py, line 147.
This is tested on OS X and a no-PHP Windows environment and is working fine.
The PHP library appears has trouble with the indent=auto setting. I looked at the source, and the option appears to be set as a Bool, so "auto" is ignored. A work-around for PHP is to set indent-attributes=1