Showing with 7,373 additions and 2,830 deletions.
  1. +28 −0 .clang-format
  2. +3 −2 .gitattributes
  3. +8 −0 .gitignore
  4. +0 −1 .luacov
  5. +0 −62 .travis.mk
  6. +16 −10 .travis.yml
  7. +13 −0 LICENSE
  8. +68 −157 Makefile
  9. +43 −198 README.md
  10. +427 −0 doc/api.md
  11. +4 −0 doc/metadata.yml
  12. +294 −0 doc/style.css
  13. +21 −0 doc/template.html
  14. +26 −0 examples/table_align_fix.lua
  15. +11 −17 gumbo.lua
  16. +0 −61 gumbo.tld
  17. +0 −30 gumbo/dom/Attr.lua
  18. +26 −0 gumbo/dom/Attribute.lua
  19. +22 −0 gumbo/dom/AttributeList.lua
  20. +0 −107 gumbo/dom/DOMException.lua
  21. +20 −9 gumbo/dom/Document.lua
  22. +5 −3 gumbo/dom/DocumentFragment.lua
  23. +11 −11 gumbo/dom/Element.lua
  24. +37 −0 gumbo/dom/ElementList.lua
  25. +0 −31 gumbo/dom/HTMLCollection.lua
  26. +0 −22 gumbo/dom/NamedNodeMap.lua
  27. +2 −30 gumbo/dom/Node.lua
  28. +0 −18 gumbo/dom/NonElementParentNode.lua
  29. +2 −2 gumbo/dom/ParentNode.lua
  30. +2 −2 gumbo/dom/Text.lua
  31. +1 −1 gumbo/dom/util.lua
  32. +8 −4 gumbo/ffi-cdef.lua
  33. +60 −15 gumbo/ffi-parse.lua
  34. +80 −33 gumbo/parse.c
  35. +18 −29 examples/sanitizer.lua → gumbo/sanitize.lua
  36. +7 −0 mk/compat.mk
  37. +23 −0 mk/dist.mk
  38. +26 −0 mk/doc.mk
  39. +14 −9 { → mk}/lualib.mk
  40. +158 −0 mk/test.mk
  41. +5 −4 rockspec.in
  42. +5 −4 runtests.lua
  43. +0 −459 template.html
  44. +4 −4 test/bench.lua
  45. +0 −2 test/dom/Comment-constructor.lua
  46. +2 −2 test/dom/Element-getElementsByClassName.lua
  47. +30 −0 test/dom/Element-namespaceURI.lua
  48. +1 −21 test/dom/{HTMLCollection-empty-name.lua → ElementList.lua}
  49. +0 −11 test/dom/Node-constants.lua
  50. +0 −66 test/dom/Node-nodeValue.lua
  51. +0 −5 test/dom/interfaces.lua
  52. +0 −20 test/git-hooks/commit-msg
  53. +0 −4 test/git-hooks/pre-commit
  54. +27 −3 test/misc.lua
  55. +47 −0 test/sanitize.lua
  56. +42 −35 test/tree-construction.lua
  57. +1 −1 test/tree-construction/README.md
  58. +143 −0 test/tree-construction/adoption01.dat
  59. +8 −0 test/tree-construction/adoption02.dat
  60. +43 −0 test/tree-construction/comments01.dat
  61. +54 −0 test/tree-construction/doctype01.dat
  62. BIN test/tree-construction/domjs-unsafe.dat
  63. +120 −0 test/tree-construction/entities01.dat
  64. +34 −0 test/tree-construction/entities02.dat
  65. +550 −0 test/tree-construction/foreign-fragment.dat
  66. +45 −0 test/tree-construction/html5test-com.dat
  67. +11 −0 test/tree-construction/inbody01.dat
  68. +7 −0 test/tree-construction/isindex.dat
  69. +46 −0 test/tree-construction/main-element.dat
  70. BIN test/tree-construction/pending-spec-changes-plain-text-unsafe.dat
  71. +9 −15 test/tree-construction/pending-spec-changes.dat
  72. BIN test/tree-construction/plain-text-unsafe.dat
  73. +298 −0 test/tree-construction/ruby.dat
  74. +57 −0 test/tree-construction/scriptdata01.dat
  75. +74 −0 test/tree-construction/tables01.dat
  76. +1,591 −0 test/tree-construction/template.dat
  77. +507 −500 test/tree-construction/tests1.dat
  78. +117 −69 test/tree-construction/tests10.dat
  79. +12 −12 test/tree-construction/tests11.dat
  80. +3 −2 test/tree-construction/tests14.dat
  81. +35 −27 test/tree-construction/tests15.dat
  82. +403 −244 test/tree-construction/tests16.dat
  83. +26 −0 test/tree-construction/tests17.dat
  84. +67 −14 test/tree-construction/tests18.dat
  85. +287 −0 test/tree-construction/tests19.dat
  86. +120 −84 test/tree-construction/tests2.dat
  87. +61 −0 test/tree-construction/tests20.dat
  88. +84 −0 test/tree-construction/tests21.dat
  89. +36 −3 test/tree-construction/tests22.dat
  90. +16 −3 test/tree-construction/tests23.dat
  91. +15 −2 test/tree-construction/tests25.dat
  92. +95 −20 test/tree-construction/tests26.dat
  93. +22 −22 test/tree-construction/tests3.dat
  94. +0 −1 test/tree-construction/tests4.dat
  95. +37 −18 test/tree-construction/tests5.dat
  96. +155 −159 test/tree-construction/tests6.dat
  97. +42 −29 test/tree-construction/tests7.dat
  98. +36 −33 test/tree-construction/tests8.dat
  99. +82 −67 test/tree-construction/tests9.dat
  100. +150 −0 test/tree-construction/tests_innerHTML_1.dat
  101. +75 −0 test/tree-construction/tricky01.dat
  102. +112 −1 test/tree-construction/webkit01.dat
  103. +40 −0 test/tree-construction/webkit02.dat
@@ -0,0 +1,28 @@
Language: Cpp
BasedOnStyle: Google
UseTab: Never
IndentWidth: 4
ColumnLimit: 80

AlignAfterOpenBracket: true
AlignConsecutiveAssignments: false
AlignTrailingComments: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BreakBeforeBraces: Attach
ContinuationIndentWidth: 4
IndentCaseLabels: false
MaxEmptyLinesToKeep: 1
PenaltyReturnTypeOnItsOwnLine: 0
PointerAlignment: Left
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
@@ -1,8 +1,9 @@
[attr]code text whitespace=tab-in-indent,trailing-space,tabwidth=4

.git* export-ignore
.travis.* export-ignore
test/git-hooks/ export-ignore
.clang-format export-ignore
.editorconfig export-ignore
.travis.yml export-ignore
CONTRIBUTING.md export-ignore

*.[ch] code
@@ -1,10 +1,18 @@
local.mk
*.so
*.o
gumbo-parser-*/
lua-gumbo-*.tar.gz
gumbo-*.rockspec
gumbo-*.rock
coverage.txt
.luacov-stats.txt
tags
README.html
README.pdf
doc/style.css.inc
doc/api.html
test/data/*MiB.html
lua-*/
LuaJIT-*/
luarocks-*/
@@ -2,7 +2,6 @@ return {
statsfile = ".luacov-stats.txt",
reportfile = "coverage.txt",
runreport = true,
deletestats = true,
include = {},
exclude = {
"luacov",

This file was deleted.

@@ -1,10 +1,16 @@
language: c
branches: {only: master}

os: [linux, osx]
compiler: [clang, gcc]
env: [LUA_PC=lua5.1, LUA_PC=lua5.2, LUA_PC=luajit]

before_install: make -f .travis.mk before_install
install: make -f .travis.mk install
script: make -f .travis.mk script
language: c
sudo: false
branches: {only: master}
os: [linux, osx]
compiler: [clang, gcc]
before_script:
- make -j8 prep
- luarocks-2.2.2/installation/bin/luarocks install luacov-coveralls
script:
- make print-vars USERVARS='CC LDFLAGS'
- make check-lua-all
- eval `luarocks-2.2.2/installation/bin/luarocks path`
- make clean-obj all USE_LOCAL_LIBGUMBO=1 LUA_CFLAGS=-Ilua-5.3.1/src LUA=lua-5.3.1/src/lua LUA_PC=none
- LD_LIBRARY_PATH=gumbo-parser-0.10.1/.libs DYLD_LIBRARY_PATH=gumbo-parser-0.10.1/.libs lua-5.3.1/src/lua -lluacov runtests.lua
after_success:
- luarocks-2.2.2/installation/bin/luacov-coveralls -t "$COVERALLS_TOKEN"
13 LICENSE
@@ -0,0 +1,13 @@
Copyright (c) 2013-2015, Craig Barnes.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.