Re: HTML Tidy complied successful with some minor troubles.

Hi,

Ok, you seem to have successfully written a test app to use tidy 
library... that's good...

You say 'This function also has a problem.', and assume you refer to 
tidySaveBuffer(...), but it is not clear???

And then you ask 'where goes wrong?'!

Well, exactly what goes wrong? What do you expect?

You passed the library just a small snippet of html, so of course Tidy 
library expanded it to a full xhtml document...

What else should it do? Maybe you need to be using other parts of the 
API if you want something different...

Some points about your program...

I have a little repo, 'Tidy Test' - 
https://github.com/geoffmcl/tidy-test - that also links to the tidy library.

It contains a FindTidy.cmake, that will correctly find the installed 
library tidy, if you convert your project to use cmake for the 
configuration, and generation of the MSVC solution files...

This would mean you would not have to use the non portable MSVC #pragma 
comment(lib, "tidy.lib")... In other words making your project more 
portable...

And as you may know using "tidy.lib" means you are linking with the 
shared (DLL) library, which then must be in the PATH, or in the same 
folder to run...

For such a standalone app perhaps it is better to use the 'static' 
library, "tidys.lib"...

Anyway, maybe you will get some more information on the tidy library API 
from the 'Test Tidy' repo...

Maybe if you explained more exactly what you are trying to do, I may be 
able to help more...

Regards,
Geoff.

PS: Also have an ongoing WIP 'Tidy GUI 2' repo - 
https://github.com/geoffmcl/tidy-gui2 - which needs Qt installed to 
build, but it may also reveal some more things about using the tidy 
library API...

Received on Friday, 4 September 2015 16:25:55 UTC