Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config: unknown option: drop-empty-elements #73

Closed
netpoetica opened this issue Nov 28, 2012 · 5 comments
Closed

Config: unknown option: drop-empty-elements #73

netpoetica opened this issue Nov 28, 2012 · 5 comments

Comments

@netpoetica
Copy link

It seems that even though I followed the instructions from the front page, make is giving me a build that does not include the newer features. My other config options work properly, but this one won't

Built with Mac OSX Mountain Lion via terminal

@craigbarnes
Copy link
Member

I just tried both of the following and they seem to work fine for me (using commit 1b4dcd0):

tidy --drop-empty-elements no <<< '<a></a>'
tidy -config <(echo "drop-empty-elements: no") <<< '<a></a>'

Which build method did you use? Are you invoking tidy from an installation or from within the build directory?

@netpoetica
Copy link
Author

Running your second command, I still receive the same error. I used the instructions from the main page here, "1) make -C build/gmake/, 2) make install -C build/gmake/". I am invoking the tidy program from the command line, which I copied out of the /bin directory after using steps 1 & 2 to make the build, and then I moved it to my programs build directory.

Is the one in the /bin folder not the correct one? I didn't find the tidy program in any other directory.

@netpoetica
Copy link
Author

I did some investigation, and, it looks like I have tidy in my /usr/local/bin/ folder - maybe it's an older install or something, and I am always invoking the wrong one? Not sure exactly how to clear that up, if that even is the issue.

@craigbarnes
Copy link
Member

Yep, that'll be it. That happens to me all the time. If you invoke it as tidy you'll always run from the location given by which tidy. Your shell just uses the first program it finds by searching the directories in echo $PATH (ordered left to right).

If you try this from the tidy source directory, it should work as expected:

make clean -C build/gmake
make -C build/gmake
bin/tidy --drop-empty-elements no <<< '<a></a>'
bin/tidy -config <(echo "drop-empty-elements: no") <<< '<a></a>'

To fix your installation, you can do one of these:

  • Install the new build over the top of /usr/local/bin/tidy using sudo make install -C build/gmake
  • Delete the old build with sudo rm -f /usr/local/bin/tidy
  • Set your PATH so that your "programs build directory" comes before /usr/local/bin
  • Invoke the tidy that you want to use with the absolute path, e.g. /home/$USER/bin/tidy --drop-empty-elements no <<< '<a></a>'

@netpoetica
Copy link
Author

Thanks! That surely did it! I should have guessed that, because I initially installed tidy from source forge and realized it was missing the features I wanted. Gonna close this issue - thanks for the super helpful response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants