Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ using that version.
If the version in question is not the latest release,
then please provide some reason why that particular version would be useful.

[tidyParseBuffer]: http://api.html-tidy.org/tidy/tidylib_api_5.4.0/group__Parse.html#gaa28ce34c95750f150205843885317851
[tidyCleanAndRepair]: http://api.html-tidy.org/tidy/tidylib_api_5.4.0/group__Clean.html#ga11fd23eeb4acfaa0f9501effa0c21269
[tidyRunDiagnostics]: http://api.html-tidy.org/tidy/tidylib_api_5.4.0/group__Clean.html#ga6170500974cc02114f6e4a29d44b7d77
[tidySaveBuffer]: http://api.html-tidy.org/tidy/tidylib_api_5.4.0/group__Save.html#ga7e8642262c8c4d34cf7cc426647d29f0
[quick_ref]: http://api.html-tidy.org/tidy/quickref_5.4.0.html
[upstream-license]: https://github.com/htacg/tidy-html5/blob/5.4.0/README/LICENSE.md
[tidyParseBuffer]: http://api.html-tidy.org/tidy/tidylib_api_5.6.0/group__Parse.html#gaa28ce34c95750f150205843885317851
[tidyCleanAndRepair]: http://api.html-tidy.org/tidy/tidylib_api_5.6.0/group__Clean.html#ga11fd23eeb4acfaa0f9501effa0c21269
[tidyRunDiagnostics]: http://api.html-tidy.org/tidy/tidylib_api_5.6.0/group__Clean.html#ga6170500974cc02114f6e4a29d44b7d77
[tidySaveBuffer]: http://api.html-tidy.org/tidy/tidylib_api_5.6.0/group__Save.html#ga7e8642262c8c4d34cf7cc426647d29f0
[quick_ref]: http://api.html-tidy.org/tidy/quickref_5.6.0.html
[upstream-license]: https://github.com/htacg/tidy-html5/blob/5.6.0/README/LICENSE.md
10 changes: 2 additions & 8 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
'tidy-html5/src/message.c',
'tidy-html5/src/config.c',
'tidy-html5/src/alloc.c',
'tidy-html5/src/attrask.c',
'tidy-html5/src/attrdict.c',
'tidy-html5/src/attrget.c',
'tidy-html5/src/buffio.c',
'tidy-html5/src/fileio.c',
'tidy-html5/src/streamio.c',
Expand All @@ -34,6 +32,8 @@
'tidy-html5/src/mappedio.c',
'tidy-html5/src/gdoc.c',
'tidy-html5/src/language.c',
'tidy-html5/src/messageobj.c',
'tidy-html5/src/sprtf.c'
],
'include_dirs': [
'tidy-html5/include',
Expand All @@ -42,9 +42,6 @@
'defines': [
'_REENTRANT',
'HAVE_CONFIG_H',
'SUPPORT_UTF16_ENCODINGS=1',
'SUPPORT_ASIAN_ENCODINGS=1',
'SUPPORT_ACCESSIBILITY_CHECKS=1',
'LIBTIDY_VERSION="<!(node parse-version.js version)"',
'RELEASE_DATE="<!(node parse-version.js date)"',
'BUILD_SHARED_LIB',
Expand Down Expand Up @@ -74,9 +71,6 @@
},
'conditions': [
['OS=="win"', {
'sources': [
'tidy-html5/src/sprtf.c',
],
'defines': [
'NOMINMAX',
'_USE_MATH_DEFINES',
Expand Down
35 changes: 28 additions & 7 deletions src/opt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,41 @@ namespace node_libtidy {
TidyOption opt = Unwrap(info.Holder()); if (!opt) return;
const char* res;
switch (tidyOptGetCategory(opt)) {
case TidyMarkup:
res = "Markup";
break;
case TidyDiagnostics:
res = "Diagnostics";
break;
case TidyPrettyPrint:
res = "PrettyPrint";
case TidyDisplay:
res = "Display";
break;
case TidyDocumentIO:
res = "DocumentIO";
break;
case TidyEncoding:
res = "Encoding";
break;
case TidyMiscellaneous:
res = "Miscellaneous";
case TidyFileIO:
res = "FileIO";
break;
case TidyMarkupCleanup:
res = "MarkupCleanup";
break;
case TidyMarkupEntities:
res = "MarkupEntities";
break;
case TidyMarkupRepair:
res = "MarkupRepair";
break;
case TidyMarkupTeach:
res = "MarkupTeach";
break;
case TidyMarkupXForm:
res = "MarkupXForm";
break;
case TidyPrettyPrint:
res = "PrettyPrint";
break;
case TidyInternalCategory:
res = "InternalCategory";
break;
default:
Nan::ThrowError("Unknown option category");
Expand Down
2 changes: 1 addition & 1 deletion test/opt-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe("TidyOption:", function() {
it("can handle boolean options", function() {
var doc = TidyDoc();
expect(doc.optGet("add-xml-decl")).to.be.false;
expect(doc.optSet("add-xml-decl", "this starts with T")).to.be.undefined;
expect(doc.optSet("add-xml-decl", true)).to.be.undefined;
expect(doc.optGet("add-xml-decl")).to.be.true;
expect(doc.optSet("add-xml-decl", false)).to.be.undefined;
expect(doc.optGet("add-xml-decl")).to.be.false;
Expand Down
2 changes: 1 addition & 1 deletion tidy-html5
Submodule tidy-html5 updated 86 files
+375 −95 CMakeLists.txt
+104 −0 README/API_AND_NAMESPACE.md
+2 −2 README/ATTRIBUTES.md
+13 −5 README/BUILD.md
+3 −0 README/CODESTYLE.md
+50 −0 README/LICENSE.txt
+17 −16 README/MESSAGES.md
+34 −33 README/OPTIONS.md
+1 −1 README/TAGS.md
+10 −10 README/VERSION.md
+90 −1 README/verhist.log
+2 −1 build/cmake/.gitignore
+14 −1 build/cmake/build-bins.bat
+1 −1 build/cmake/cmake-clean.txt
+1 −0 build/win64/.gitignore
+14 −1 build/win64/build-bins.bat
+15 −0 build/win64/build-me.bat
+1,247 −783 console/tidy.c
+1,948 −894 include/tidy.h
+27 −14 include/tidybuffio.h
+1,339 −714 include/tidyenum.h
+417 −380 include/tidyplatform.h
+1 −5 localize/language_ll_cc.h.erb
+3 −2 localize/poconvert.rb
+2,601 −2,331 localize/translations/language_en_gb.po
+2,531 −2,302 localize/translations/language_es.po
+2,521 −2,292 localize/translations/language_es_mx.po
+3,161 −1,788 localize/translations/language_fr.po
+4,352 −0 localize/translations/language_pt_br.po
+2,520 −2,291 localize/translations/language_zh_cn.po
+2,521 −2,292 localize/translations/tidy.pot
+51 −9 man/tidy1.xsl.in
+121 −150 src/access.c
+28 −219 src/access.h
+16 −8 src/alloc.c
+0 −204 src/attrask.c
+2 −0 src/attrdict.c
+0 −208 src/attrget.c
+269 −190 src/attrs.c
+24 −9 src/attrs.h
+238 −142 src/clean.c
+3 −6 src/clean.h
+841 −669 src/config.c
+324 −45 src/config.h
+2,080 −309 src/entities.c
+4 −6 src/fileio.c
+3 −0 src/forward.h
+5 −0 src/gdoc.c
+0 −104 src/iconvtc.c
+0 −14 src/iconvtc.h
+1 −4 src/istack.c
+83 −389 src/language.c
+69 −185 src/language.h
+1,958 −1,832 src/language_en.h
+85 −35 src/language_en_gb.h
+12 −17 src/language_es.h
+2 −6 src/language_es_mx.h
+1,033 −432 src/language_fr.h
+1,296 −0 src/language_pt_br.h
+6 −7 src/language_zh_cn.h
+187 −201 src/lexer.c
+4 −22 src/lexer.h
+24 −34 src/mappedio.c
+1,333 −842 src/message.c
+253 −223 src/message.h
+653 −0 src/messageobj.c
+181 −0 src/messageobj.h
+307 −466 src/parser.c
+163 −28 src/parser.h
+52 −187 src/pprint.c
+0 −5 src/pprint.h
+29 −32 src/sprtf.c
+56 −20 src/sprtf.h
+9 −250 src/streamio.c
+4 −40 src/streamio.h
+0 −246 src/tagask.c
+121 −58 src/tags.c
+285 −62 src/tags.h
+64 −43 src/tidy-int.h
+566 −243 src/tidylib.c
+8 −46 src/tmbstr.c
+0 −11 src/utf8.c
+0 −794 src/win32tc.c
+0 −18 src/win32tc.h
+11 −0 tidy.pc.cmake.in
+2 −2 version.txt