From 9075f72d9c8bf4096332aa86787dc92837a19dff Mon Sep 17 00:00:00 2001 From: early Date: Mon, 2 Sep 2024 12:35:02 -0600 Subject: [PATCH] rethink making the worse html package public --- htmltree/attrs.go | 2 +- htmltree/prettify.go | 2 +- internal/compile/compile.go | 2 +- internal/compile/component.go | 4 ++-- internal/compile/template.go | 2 +- {html => internal/html}/LICENSE | 0 {html => internal/html}/PATENTS | 0 {html => internal/html}/README.md | 0 {html => internal/html}/atom/atom.go | 2 +- {html => internal/html}/atom/atom_test.go | 0 {html => internal/html}/atom/gen.go | 0 {html => internal/html}/atom/table.go | 0 {html => internal/html}/atom/table_test.go | 0 {html => internal/html}/charset/charset.go | 4 ++-- {html => internal/html}/charset/charset_test.go | 0 .../html}/charset/testdata/HTTP-charset.html | 0 .../html}/charset/testdata/HTTP-vs-UTF-8-BOM.html | 0 .../charset/testdata/HTTP-vs-meta-charset.html | 0 .../charset/testdata/HTTP-vs-meta-content.html | 0 .../charset/testdata/No-encoding-declaration.html | 0 {html => internal/html}/charset/testdata/README | 0 .../html}/charset/testdata/UTF-16BE-BOM.html | Bin .../html}/charset/testdata/UTF-16LE-BOM.html | Bin .../charset/testdata/UTF-8-BOM-vs-meta-charset.html | 0 .../charset/testdata/UTF-8-BOM-vs-meta-content.html | 0 .../charset/testdata/meta-charset-attribute.html | 0 .../charset/testdata/meta-content-attribute.html | 0 {html => internal/html}/comment_test.go | 0 {html => internal/html}/const.go | 0 {html => internal/html}/doc.go | 2 +- {html => internal/html}/doctype.go | 0 {html => internal/html}/entity.go | 0 {html => internal/html}/entity_test.go | 0 {html => internal/html}/escape.go | 0 {html => internal/html}/escape_test.go | 0 {html => internal/html}/example_test.go | 2 +- {html => internal/html}/foreign.go | 0 {html => internal/html}/node.go | 2 +- {html => internal/html}/node_test.go | 0 {html => internal/html}/parse.go | 2 +- {html => internal/html}/parse_test.go | 2 +- {html => internal/html}/render.go | 0 {html => internal/html}/render_test.go | 0 .../go/issue_30600_parse_panics_in_cell_mode.dat | 0 .../issue_30961_error_nested_unknown_tag_types.dat | 0 .../html}/testdata/go/raw_tags_to_be_ignored.dat | 0 {html => internal/html}/testdata/go/select.dat | 0 {html => internal/html}/testdata/go/template.dat | 0 {html => internal/html}/testdata/go1.html | 0 {html => internal/html}/testdata/webkit/README | 0 .../html}/testdata/webkit/adoption01.dat | 0 .../html}/testdata/webkit/adoption02.dat | 0 {html => internal/html}/testdata/webkit/blocks.dat | 0 .../html}/testdata/webkit/comments01.dat | 0 .../html}/testdata/webkit/doctype01.dat | 0 .../html}/testdata/webkit/domjs-unsafe.dat | Bin .../html}/testdata/webkit/entities01.dat | 0 .../html}/testdata/webkit/entities02.dat | 0 .../html}/testdata/webkit/foreign-fragment.dat | 0 .../html}/testdata/webkit/html5test-com.dat | 0 .../html}/testdata/webkit/inbody01.dat | 0 {html => internal/html}/testdata/webkit/isindex.dat | 0 .../html}/testdata/webkit/main-element.dat | 0 {html => internal/html}/testdata/webkit/math.dat | 0 .../html}/testdata/webkit/menuitem-element.dat | 0 .../html}/testdata/webkit/namespace-sensitivity.dat | 0 .../html}/testdata/webkit/noscript01.dat | 0 .../pending-spec-changes-plain-text-unsafe.dat | Bin .../html}/testdata/webkit/pending-spec-changes.dat | 0 .../html}/testdata/webkit/plain-text-unsafe.dat | Bin {html => internal/html}/testdata/webkit/ruby.dat | 0 .../html}/testdata/webkit/scriptdata01.dat | 0 .../html}/testdata/webkit/scripted/adoption01.dat | 0 .../html}/testdata/webkit/scripted/ark.dat | 0 .../html}/testdata/webkit/scripted/webkit01.dat | 0 {html => internal/html}/testdata/webkit/svg.dat | 0 .../html}/testdata/webkit/tables01.dat | 0 .../html}/testdata/webkit/template.dat | 0 {html => internal/html}/testdata/webkit/tests1.dat | 0 {html => internal/html}/testdata/webkit/tests10.dat | 0 {html => internal/html}/testdata/webkit/tests11.dat | 0 {html => internal/html}/testdata/webkit/tests12.dat | 0 {html => internal/html}/testdata/webkit/tests14.dat | 0 {html => internal/html}/testdata/webkit/tests15.dat | 0 {html => internal/html}/testdata/webkit/tests16.dat | 0 {html => internal/html}/testdata/webkit/tests17.dat | 0 {html => internal/html}/testdata/webkit/tests18.dat | 0 {html => internal/html}/testdata/webkit/tests19.dat | 0 {html => internal/html}/testdata/webkit/tests2.dat | 0 {html => internal/html}/testdata/webkit/tests20.dat | 0 {html => internal/html}/testdata/webkit/tests21.dat | 0 {html => internal/html}/testdata/webkit/tests22.dat | 0 {html => internal/html}/testdata/webkit/tests23.dat | 0 {html => internal/html}/testdata/webkit/tests24.dat | 0 {html => internal/html}/testdata/webkit/tests25.dat | 0 {html => internal/html}/testdata/webkit/tests26.dat | 0 {html => internal/html}/testdata/webkit/tests3.dat | 0 {html => internal/html}/testdata/webkit/tests4.dat | 0 {html => internal/html}/testdata/webkit/tests5.dat | 0 {html => internal/html}/testdata/webkit/tests6.dat | 0 {html => internal/html}/testdata/webkit/tests7.dat | 0 {html => internal/html}/testdata/webkit/tests8.dat | 0 {html => internal/html}/testdata/webkit/tests9.dat | 0 .../html}/testdata/webkit/tests_innerHTML_1.dat | 0 .../html}/testdata/webkit/tricky01.dat | 0 .../html}/testdata/webkit/webkit01.dat | 0 .../html}/testdata/webkit/webkit02.dat | 0 {html => internal/html}/token.go | 2 +- {html => internal/html}/token_test.go | 0 109 files changed, 15 insertions(+), 15 deletions(-) rename {html => internal/html}/LICENSE (100%) rename {html => internal/html}/PATENTS (100%) rename {html => internal/html}/README.md (100%) rename {html => internal/html}/atom/atom.go (96%) rename {html => internal/html}/atom/atom_test.go (100%) rename {html => internal/html}/atom/gen.go (100%) rename {html => internal/html}/atom/table.go (100%) rename {html => internal/html}/atom/table_test.go (100%) rename {html => internal/html}/charset/charset.go (97%) rename {html => internal/html}/charset/charset_test.go (100%) rename {html => internal/html}/charset/testdata/HTTP-charset.html (100%) rename {html => internal/html}/charset/testdata/HTTP-vs-UTF-8-BOM.html (100%) rename {html => internal/html}/charset/testdata/HTTP-vs-meta-charset.html (100%) rename {html => internal/html}/charset/testdata/HTTP-vs-meta-content.html (100%) rename {html => internal/html}/charset/testdata/No-encoding-declaration.html (100%) rename {html => internal/html}/charset/testdata/README (100%) rename {html => internal/html}/charset/testdata/UTF-16BE-BOM.html (100%) rename {html => internal/html}/charset/testdata/UTF-16LE-BOM.html (100%) rename {html => internal/html}/charset/testdata/UTF-8-BOM-vs-meta-charset.html (100%) rename {html => internal/html}/charset/testdata/UTF-8-BOM-vs-meta-content.html (100%) rename {html => internal/html}/charset/testdata/meta-charset-attribute.html (100%) rename {html => internal/html}/charset/testdata/meta-content-attribute.html (100%) rename {html => internal/html}/comment_test.go (100%) rename {html => internal/html}/const.go (100%) rename {html => internal/html}/doc.go (98%) rename {html => internal/html}/doctype.go (100%) rename {html => internal/html}/entity.go (100%) rename {html => internal/html}/entity_test.go (100%) rename {html => internal/html}/escape.go (100%) rename {html => internal/html}/escape_test.go (100%) rename {html => internal/html}/example_test.go (94%) rename {html => internal/html}/foreign.go (100%) rename {html => internal/html}/node.go (99%) rename {html => internal/html}/node_test.go (100%) rename {html => internal/html}/parse.go (99%) rename {html => internal/html}/parse_test.go (99%) rename {html => internal/html}/render.go (100%) rename {html => internal/html}/render_test.go (100%) rename {html => internal/html}/testdata/go/issue_30600_parse_panics_in_cell_mode.dat (100%) rename {html => internal/html}/testdata/go/issue_30961_error_nested_unknown_tag_types.dat (100%) rename {html => internal/html}/testdata/go/raw_tags_to_be_ignored.dat (100%) rename {html => internal/html}/testdata/go/select.dat (100%) rename {html => internal/html}/testdata/go/template.dat (100%) rename {html => internal/html}/testdata/go1.html (100%) rename {html => internal/html}/testdata/webkit/README (100%) rename {html => internal/html}/testdata/webkit/adoption01.dat (100%) rename {html => internal/html}/testdata/webkit/adoption02.dat (100%) rename {html => internal/html}/testdata/webkit/blocks.dat (100%) rename {html => internal/html}/testdata/webkit/comments01.dat (100%) rename {html => internal/html}/testdata/webkit/doctype01.dat (100%) rename {html => internal/html}/testdata/webkit/domjs-unsafe.dat (100%) rename {html => internal/html}/testdata/webkit/entities01.dat (100%) rename {html => internal/html}/testdata/webkit/entities02.dat (100%) rename {html => internal/html}/testdata/webkit/foreign-fragment.dat (100%) rename {html => internal/html}/testdata/webkit/html5test-com.dat (100%) rename {html => internal/html}/testdata/webkit/inbody01.dat (100%) rename {html => internal/html}/testdata/webkit/isindex.dat (100%) rename {html => internal/html}/testdata/webkit/main-element.dat (100%) rename {html => internal/html}/testdata/webkit/math.dat (100%) rename {html => internal/html}/testdata/webkit/menuitem-element.dat (100%) rename {html => internal/html}/testdata/webkit/namespace-sensitivity.dat (100%) rename {html => internal/html}/testdata/webkit/noscript01.dat (100%) rename {html => internal/html}/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat (100%) rename {html => internal/html}/testdata/webkit/pending-spec-changes.dat (100%) rename {html => internal/html}/testdata/webkit/plain-text-unsafe.dat (100%) rename {html => internal/html}/testdata/webkit/ruby.dat (100%) rename {html => internal/html}/testdata/webkit/scriptdata01.dat (100%) rename {html => internal/html}/testdata/webkit/scripted/adoption01.dat (100%) rename {html => internal/html}/testdata/webkit/scripted/ark.dat (100%) rename {html => internal/html}/testdata/webkit/scripted/webkit01.dat (100%) rename {html => internal/html}/testdata/webkit/svg.dat (100%) rename {html => internal/html}/testdata/webkit/tables01.dat (100%) rename {html => internal/html}/testdata/webkit/template.dat (100%) rename {html => internal/html}/testdata/webkit/tests1.dat (100%) rename {html => internal/html}/testdata/webkit/tests10.dat (100%) rename {html => internal/html}/testdata/webkit/tests11.dat (100%) rename {html => internal/html}/testdata/webkit/tests12.dat (100%) rename {html => internal/html}/testdata/webkit/tests14.dat (100%) rename {html => internal/html}/testdata/webkit/tests15.dat (100%) rename {html => internal/html}/testdata/webkit/tests16.dat (100%) rename {html => internal/html}/testdata/webkit/tests17.dat (100%) rename {html => internal/html}/testdata/webkit/tests18.dat (100%) rename {html => internal/html}/testdata/webkit/tests19.dat (100%) rename {html => internal/html}/testdata/webkit/tests2.dat (100%) rename {html => internal/html}/testdata/webkit/tests20.dat (100%) rename {html => internal/html}/testdata/webkit/tests21.dat (100%) rename {html => internal/html}/testdata/webkit/tests22.dat (100%) rename {html => internal/html}/testdata/webkit/tests23.dat (100%) rename {html => internal/html}/testdata/webkit/tests24.dat (100%) rename {html => internal/html}/testdata/webkit/tests25.dat (100%) rename {html => internal/html}/testdata/webkit/tests26.dat (100%) rename {html => internal/html}/testdata/webkit/tests3.dat (100%) rename {html => internal/html}/testdata/webkit/tests4.dat (100%) rename {html => internal/html}/testdata/webkit/tests5.dat (100%) rename {html => internal/html}/testdata/webkit/tests6.dat (100%) rename {html => internal/html}/testdata/webkit/tests7.dat (100%) rename {html => internal/html}/testdata/webkit/tests8.dat (100%) rename {html => internal/html}/testdata/webkit/tests9.dat (100%) rename {html => internal/html}/testdata/webkit/tests_innerHTML_1.dat (100%) rename {html => internal/html}/testdata/webkit/tricky01.dat (100%) rename {html => internal/html}/testdata/webkit/webkit01.dat (100%) rename {html => internal/html}/testdata/webkit/webkit02.dat (100%) rename {html => internal/html}/token.go (99%) rename {html => internal/html}/token_test.go (100%) diff --git a/htmltree/attrs.go b/htmltree/attrs.go index 3233a2e..4d9ab2e 100644 --- a/htmltree/attrs.go +++ b/htmltree/attrs.go @@ -1,7 +1,7 @@ // Copyright (C) 2024 early (LGPL) package htmltree -import "git.earlybird.gay/today-engine/html" +import "git.earlybird.gay/today-engine/internal/html" func GetAttr(n *html.Node, name string) string { for _, attr := range n.Attr { diff --git a/htmltree/prettify.go b/htmltree/prettify.go index e3e5ea2..7bd4865 100644 --- a/htmltree/prettify.go +++ b/htmltree/prettify.go @@ -6,7 +6,7 @@ import ( "regexp" "strings" - "git.earlybird.gay/today-engine/html" + "git.earlybird.gay/today-engine/internal/html" ) func Walk(root *html.Node, f func(*html.Node) (bool, error)) error { diff --git a/internal/compile/compile.go b/internal/compile/compile.go index 132fab2..f5937bb 100644 --- a/internal/compile/compile.go +++ b/internal/compile/compile.go @@ -8,9 +8,9 @@ import ( "regexp" "strings" - "git.earlybird.gay/today-engine/html" "git.earlybird.gay/today-engine/htmltree" "git.earlybird.gay/today-engine/include" + "git.earlybird.gay/today-engine/internal/html" "git.earlybird.gay/today-engine/render" ) diff --git a/internal/compile/component.go b/internal/compile/component.go index a4f16e8..0c2aaff 100644 --- a/internal/compile/component.go +++ b/internal/compile/component.go @@ -3,9 +3,9 @@ package compile import ( "errors" - "git.earlybird.gay/today-engine/html" - "git.earlybird.gay/today-engine/html/atom" "git.earlybird.gay/today-engine/htmltree" + "git.earlybird.gay/today-engine/internal/html" + "git.earlybird.gay/today-engine/internal/html/atom" ) var ErrBadComponentFormat = errors.New("web components must either be a script or a template and script") diff --git a/internal/compile/template.go b/internal/compile/template.go index dc602e0..894e667 100644 --- a/internal/compile/template.go +++ b/internal/compile/template.go @@ -8,8 +8,8 @@ import ( "slices" "strings" - "git.earlybird.gay/today-engine/html" "git.earlybird.gay/today-engine/htmltree" + "git.earlybird.gay/today-engine/internal/html" ) const ( diff --git a/html/LICENSE b/internal/html/LICENSE similarity index 100% rename from html/LICENSE rename to internal/html/LICENSE diff --git a/html/PATENTS b/internal/html/PATENTS similarity index 100% rename from html/PATENTS rename to internal/html/PATENTS diff --git a/html/README.md b/internal/html/README.md similarity index 100% rename from html/README.md rename to internal/html/README.md diff --git a/html/atom/atom.go b/internal/html/atom/atom.go similarity index 96% rename from html/atom/atom.go rename to internal/html/atom/atom.go index b4439bc..cb79263 100644 --- a/html/atom/atom.go +++ b/internal/html/atom/atom.go @@ -15,7 +15,7 @@ // whether atom.H1 < atom.H2 may also change. The codes are not guaranteed to // be dense. The only guarantees are that e.g. looking up "div" will yield // atom.Div, calling atom.Div.String will return "div", and atom.Div != 0. -package atom // import "git.earlybird.gay/today-engine/html/atom" +package atom // import "git.earlybird.gay/today-engine/internal/html/atom" // Atom is an integer code for a string. The zero value maps to "". type Atom uint32 diff --git a/html/atom/atom_test.go b/internal/html/atom/atom_test.go similarity index 100% rename from html/atom/atom_test.go rename to internal/html/atom/atom_test.go diff --git a/html/atom/gen.go b/internal/html/atom/gen.go similarity index 100% rename from html/atom/gen.go rename to internal/html/atom/gen.go diff --git a/html/atom/table.go b/internal/html/atom/table.go similarity index 100% rename from html/atom/table.go rename to internal/html/atom/table.go diff --git a/html/atom/table_test.go b/internal/html/atom/table_test.go similarity index 100% rename from html/atom/table_test.go rename to internal/html/atom/table_test.go diff --git a/html/charset/charset.go b/internal/html/charset/charset.go similarity index 97% rename from html/charset/charset.go rename to internal/html/charset/charset.go index 00062a7..f61c6c3 100644 --- a/html/charset/charset.go +++ b/internal/html/charset/charset.go @@ -6,7 +6,7 @@ // // The mapping from encoding labels to encodings is defined at // https://encoding.spec.whatwg.org/. -package charset // import "git.earlybird.gay/today-engine/html/charset" +package charset // import "git.earlybird.gay/today-engine/internal/html/charset" import ( "bytes" @@ -16,7 +16,7 @@ import ( "strings" "unicode/utf8" - "git.earlybird.gay/today-engine/html" + "git.earlybird.gay/today-engine/internal/html" "golang.org/x/text/encoding" "golang.org/x/text/encoding/charmap" "golang.org/x/text/encoding/htmlindex" diff --git a/html/charset/charset_test.go b/internal/html/charset/charset_test.go similarity index 100% rename from html/charset/charset_test.go rename to internal/html/charset/charset_test.go diff --git a/html/charset/testdata/HTTP-charset.html b/internal/html/charset/testdata/HTTP-charset.html similarity index 100% rename from html/charset/testdata/HTTP-charset.html rename to internal/html/charset/testdata/HTTP-charset.html diff --git a/html/charset/testdata/HTTP-vs-UTF-8-BOM.html b/internal/html/charset/testdata/HTTP-vs-UTF-8-BOM.html similarity index 100% rename from html/charset/testdata/HTTP-vs-UTF-8-BOM.html rename to internal/html/charset/testdata/HTTP-vs-UTF-8-BOM.html diff --git a/html/charset/testdata/HTTP-vs-meta-charset.html b/internal/html/charset/testdata/HTTP-vs-meta-charset.html similarity index 100% rename from html/charset/testdata/HTTP-vs-meta-charset.html rename to internal/html/charset/testdata/HTTP-vs-meta-charset.html diff --git a/html/charset/testdata/HTTP-vs-meta-content.html b/internal/html/charset/testdata/HTTP-vs-meta-content.html similarity index 100% rename from html/charset/testdata/HTTP-vs-meta-content.html rename to internal/html/charset/testdata/HTTP-vs-meta-content.html diff --git a/html/charset/testdata/No-encoding-declaration.html b/internal/html/charset/testdata/No-encoding-declaration.html similarity index 100% rename from html/charset/testdata/No-encoding-declaration.html rename to internal/html/charset/testdata/No-encoding-declaration.html diff --git a/html/charset/testdata/README b/internal/html/charset/testdata/README similarity index 100% rename from html/charset/testdata/README rename to internal/html/charset/testdata/README diff --git a/html/charset/testdata/UTF-16BE-BOM.html b/internal/html/charset/testdata/UTF-16BE-BOM.html similarity index 100% rename from html/charset/testdata/UTF-16BE-BOM.html rename to internal/html/charset/testdata/UTF-16BE-BOM.html diff --git a/html/charset/testdata/UTF-16LE-BOM.html b/internal/html/charset/testdata/UTF-16LE-BOM.html similarity index 100% rename from html/charset/testdata/UTF-16LE-BOM.html rename to internal/html/charset/testdata/UTF-16LE-BOM.html diff --git a/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html b/internal/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html similarity index 100% rename from html/charset/testdata/UTF-8-BOM-vs-meta-charset.html rename to internal/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html diff --git a/html/charset/testdata/UTF-8-BOM-vs-meta-content.html b/internal/html/charset/testdata/UTF-8-BOM-vs-meta-content.html similarity index 100% rename from html/charset/testdata/UTF-8-BOM-vs-meta-content.html rename to internal/html/charset/testdata/UTF-8-BOM-vs-meta-content.html diff --git a/html/charset/testdata/meta-charset-attribute.html b/internal/html/charset/testdata/meta-charset-attribute.html similarity index 100% rename from html/charset/testdata/meta-charset-attribute.html rename to internal/html/charset/testdata/meta-charset-attribute.html diff --git a/html/charset/testdata/meta-content-attribute.html b/internal/html/charset/testdata/meta-content-attribute.html similarity index 100% rename from html/charset/testdata/meta-content-attribute.html rename to internal/html/charset/testdata/meta-content-attribute.html diff --git a/html/comment_test.go b/internal/html/comment_test.go similarity index 100% rename from html/comment_test.go rename to internal/html/comment_test.go diff --git a/html/const.go b/internal/html/const.go similarity index 100% rename from html/const.go rename to internal/html/const.go diff --git a/html/doc.go b/internal/html/doc.go similarity index 98% rename from html/doc.go rename to internal/html/doc.go index 23bfd3d..850c47f 100644 --- a/html/doc.go +++ b/internal/html/doc.go @@ -114,7 +114,7 @@ parsed content, the input must be re-serialized (for instance by using Render or Token.String) in order for those trust decisions to hold, as the process of tokenization or parsing may alter the content. */ -package html // import "git.earlybird.gay/today-engine/html" +package html // import "git.earlybird.gay/today-engine/internal/html" // The tokenization algorithm implemented by this package is not a line-by-line // transliteration of the relatively verbose state-machine in the WHATWG diff --git a/html/doctype.go b/internal/html/doctype.go similarity index 100% rename from html/doctype.go rename to internal/html/doctype.go diff --git a/html/entity.go b/internal/html/entity.go similarity index 100% rename from html/entity.go rename to internal/html/entity.go diff --git a/html/entity_test.go b/internal/html/entity_test.go similarity index 100% rename from html/entity_test.go rename to internal/html/entity_test.go diff --git a/html/escape.go b/internal/html/escape.go similarity index 100% rename from html/escape.go rename to internal/html/escape.go diff --git a/html/escape_test.go b/internal/html/escape_test.go similarity index 100% rename from html/escape_test.go rename to internal/html/escape_test.go diff --git a/html/example_test.go b/internal/html/example_test.go similarity index 94% rename from html/example_test.go rename to internal/html/example_test.go index bb428d1..ebdd168 100644 --- a/html/example_test.go +++ b/internal/html/example_test.go @@ -10,7 +10,7 @@ import ( "log" "strings" - "git.earlybird.gay/today-engine/html" + "git.earlybird.gay/today-engine/internal/html" ) func ExampleParse() { diff --git a/html/foreign.go b/internal/html/foreign.go similarity index 100% rename from html/foreign.go rename to internal/html/foreign.go diff --git a/html/node.go b/internal/html/node.go similarity index 99% rename from html/node.go rename to internal/html/node.go index 4a110ab..bb1624b 100644 --- a/html/node.go +++ b/internal/html/node.go @@ -5,7 +5,7 @@ package html import ( - "git.earlybird.gay/today-engine/html/atom" + "git.earlybird.gay/today-engine/internal/html/atom" ) // A NodeType is the type of a Node. diff --git a/html/node_test.go b/internal/html/node_test.go similarity index 100% rename from html/node_test.go rename to internal/html/node_test.go diff --git a/html/parse.go b/internal/html/parse.go similarity index 99% rename from html/parse.go rename to internal/html/parse.go index d813c7b..8c1131b 100644 --- a/html/parse.go +++ b/internal/html/parse.go @@ -10,7 +10,7 @@ import ( "io" "strings" - a "git.earlybird.gay/today-engine/html/atom" + a "git.earlybird.gay/today-engine/internal/html/atom" ) // A parser implements the HTML5 parsing algorithm: diff --git a/html/parse_test.go b/internal/html/parse_test.go similarity index 99% rename from html/parse_test.go rename to internal/html/parse_test.go index 0eb2be1..b2b7fdc 100644 --- a/html/parse_test.go +++ b/internal/html/parse_test.go @@ -17,7 +17,7 @@ import ( "strings" "testing" - "git.earlybird.gay/today-engine/html/atom" + "git.earlybird.gay/today-engine/internal/html/atom" ) type testAttrs struct { diff --git a/html/render.go b/internal/html/render.go similarity index 100% rename from html/render.go rename to internal/html/render.go diff --git a/html/render_test.go b/internal/html/render_test.go similarity index 100% rename from html/render_test.go rename to internal/html/render_test.go diff --git a/html/testdata/go/issue_30600_parse_panics_in_cell_mode.dat b/internal/html/testdata/go/issue_30600_parse_panics_in_cell_mode.dat similarity index 100% rename from html/testdata/go/issue_30600_parse_panics_in_cell_mode.dat rename to internal/html/testdata/go/issue_30600_parse_panics_in_cell_mode.dat diff --git a/html/testdata/go/issue_30961_error_nested_unknown_tag_types.dat b/internal/html/testdata/go/issue_30961_error_nested_unknown_tag_types.dat similarity index 100% rename from html/testdata/go/issue_30961_error_nested_unknown_tag_types.dat rename to internal/html/testdata/go/issue_30961_error_nested_unknown_tag_types.dat diff --git a/html/testdata/go/raw_tags_to_be_ignored.dat b/internal/html/testdata/go/raw_tags_to_be_ignored.dat similarity index 100% rename from html/testdata/go/raw_tags_to_be_ignored.dat rename to internal/html/testdata/go/raw_tags_to_be_ignored.dat diff --git a/html/testdata/go/select.dat b/internal/html/testdata/go/select.dat similarity index 100% rename from html/testdata/go/select.dat rename to internal/html/testdata/go/select.dat diff --git a/html/testdata/go/template.dat b/internal/html/testdata/go/template.dat similarity index 100% rename from html/testdata/go/template.dat rename to internal/html/testdata/go/template.dat diff --git a/html/testdata/go1.html b/internal/html/testdata/go1.html similarity index 100% rename from html/testdata/go1.html rename to internal/html/testdata/go1.html diff --git a/html/testdata/webkit/README b/internal/html/testdata/webkit/README similarity index 100% rename from html/testdata/webkit/README rename to internal/html/testdata/webkit/README diff --git a/html/testdata/webkit/adoption01.dat b/internal/html/testdata/webkit/adoption01.dat similarity index 100% rename from html/testdata/webkit/adoption01.dat rename to internal/html/testdata/webkit/adoption01.dat diff --git a/html/testdata/webkit/adoption02.dat b/internal/html/testdata/webkit/adoption02.dat similarity index 100% rename from html/testdata/webkit/adoption02.dat rename to internal/html/testdata/webkit/adoption02.dat diff --git a/html/testdata/webkit/blocks.dat b/internal/html/testdata/webkit/blocks.dat similarity index 100% rename from html/testdata/webkit/blocks.dat rename to internal/html/testdata/webkit/blocks.dat diff --git a/html/testdata/webkit/comments01.dat b/internal/html/testdata/webkit/comments01.dat similarity index 100% rename from html/testdata/webkit/comments01.dat rename to internal/html/testdata/webkit/comments01.dat diff --git a/html/testdata/webkit/doctype01.dat b/internal/html/testdata/webkit/doctype01.dat similarity index 100% rename from html/testdata/webkit/doctype01.dat rename to internal/html/testdata/webkit/doctype01.dat diff --git a/html/testdata/webkit/domjs-unsafe.dat b/internal/html/testdata/webkit/domjs-unsafe.dat similarity index 100% rename from html/testdata/webkit/domjs-unsafe.dat rename to internal/html/testdata/webkit/domjs-unsafe.dat diff --git a/html/testdata/webkit/entities01.dat b/internal/html/testdata/webkit/entities01.dat similarity index 100% rename from html/testdata/webkit/entities01.dat rename to internal/html/testdata/webkit/entities01.dat diff --git a/html/testdata/webkit/entities02.dat b/internal/html/testdata/webkit/entities02.dat similarity index 100% rename from html/testdata/webkit/entities02.dat rename to internal/html/testdata/webkit/entities02.dat diff --git a/html/testdata/webkit/foreign-fragment.dat b/internal/html/testdata/webkit/foreign-fragment.dat similarity index 100% rename from html/testdata/webkit/foreign-fragment.dat rename to internal/html/testdata/webkit/foreign-fragment.dat diff --git a/html/testdata/webkit/html5test-com.dat b/internal/html/testdata/webkit/html5test-com.dat similarity index 100% rename from html/testdata/webkit/html5test-com.dat rename to internal/html/testdata/webkit/html5test-com.dat diff --git a/html/testdata/webkit/inbody01.dat b/internal/html/testdata/webkit/inbody01.dat similarity index 100% rename from html/testdata/webkit/inbody01.dat rename to internal/html/testdata/webkit/inbody01.dat diff --git a/html/testdata/webkit/isindex.dat b/internal/html/testdata/webkit/isindex.dat similarity index 100% rename from html/testdata/webkit/isindex.dat rename to internal/html/testdata/webkit/isindex.dat diff --git a/html/testdata/webkit/main-element.dat b/internal/html/testdata/webkit/main-element.dat similarity index 100% rename from html/testdata/webkit/main-element.dat rename to internal/html/testdata/webkit/main-element.dat diff --git a/html/testdata/webkit/math.dat b/internal/html/testdata/webkit/math.dat similarity index 100% rename from html/testdata/webkit/math.dat rename to internal/html/testdata/webkit/math.dat diff --git a/html/testdata/webkit/menuitem-element.dat b/internal/html/testdata/webkit/menuitem-element.dat similarity index 100% rename from html/testdata/webkit/menuitem-element.dat rename to internal/html/testdata/webkit/menuitem-element.dat diff --git a/html/testdata/webkit/namespace-sensitivity.dat b/internal/html/testdata/webkit/namespace-sensitivity.dat similarity index 100% rename from html/testdata/webkit/namespace-sensitivity.dat rename to internal/html/testdata/webkit/namespace-sensitivity.dat diff --git a/html/testdata/webkit/noscript01.dat b/internal/html/testdata/webkit/noscript01.dat similarity index 100% rename from html/testdata/webkit/noscript01.dat rename to internal/html/testdata/webkit/noscript01.dat diff --git a/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat b/internal/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat similarity index 100% rename from html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat rename to internal/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat diff --git a/html/testdata/webkit/pending-spec-changes.dat b/internal/html/testdata/webkit/pending-spec-changes.dat similarity index 100% rename from html/testdata/webkit/pending-spec-changes.dat rename to internal/html/testdata/webkit/pending-spec-changes.dat diff --git a/html/testdata/webkit/plain-text-unsafe.dat b/internal/html/testdata/webkit/plain-text-unsafe.dat similarity index 100% rename from html/testdata/webkit/plain-text-unsafe.dat rename to internal/html/testdata/webkit/plain-text-unsafe.dat diff --git a/html/testdata/webkit/ruby.dat b/internal/html/testdata/webkit/ruby.dat similarity index 100% rename from html/testdata/webkit/ruby.dat rename to internal/html/testdata/webkit/ruby.dat diff --git a/html/testdata/webkit/scriptdata01.dat b/internal/html/testdata/webkit/scriptdata01.dat similarity index 100% rename from html/testdata/webkit/scriptdata01.dat rename to internal/html/testdata/webkit/scriptdata01.dat diff --git a/html/testdata/webkit/scripted/adoption01.dat b/internal/html/testdata/webkit/scripted/adoption01.dat similarity index 100% rename from html/testdata/webkit/scripted/adoption01.dat rename to internal/html/testdata/webkit/scripted/adoption01.dat diff --git a/html/testdata/webkit/scripted/ark.dat b/internal/html/testdata/webkit/scripted/ark.dat similarity index 100% rename from html/testdata/webkit/scripted/ark.dat rename to internal/html/testdata/webkit/scripted/ark.dat diff --git a/html/testdata/webkit/scripted/webkit01.dat b/internal/html/testdata/webkit/scripted/webkit01.dat similarity index 100% rename from html/testdata/webkit/scripted/webkit01.dat rename to internal/html/testdata/webkit/scripted/webkit01.dat diff --git a/html/testdata/webkit/svg.dat b/internal/html/testdata/webkit/svg.dat similarity index 100% rename from html/testdata/webkit/svg.dat rename to internal/html/testdata/webkit/svg.dat diff --git a/html/testdata/webkit/tables01.dat b/internal/html/testdata/webkit/tables01.dat similarity index 100% rename from html/testdata/webkit/tables01.dat rename to internal/html/testdata/webkit/tables01.dat diff --git a/html/testdata/webkit/template.dat b/internal/html/testdata/webkit/template.dat similarity index 100% rename from html/testdata/webkit/template.dat rename to internal/html/testdata/webkit/template.dat diff --git a/html/testdata/webkit/tests1.dat b/internal/html/testdata/webkit/tests1.dat similarity index 100% rename from html/testdata/webkit/tests1.dat rename to internal/html/testdata/webkit/tests1.dat diff --git a/html/testdata/webkit/tests10.dat b/internal/html/testdata/webkit/tests10.dat similarity index 100% rename from html/testdata/webkit/tests10.dat rename to internal/html/testdata/webkit/tests10.dat diff --git a/html/testdata/webkit/tests11.dat b/internal/html/testdata/webkit/tests11.dat similarity index 100% rename from html/testdata/webkit/tests11.dat rename to internal/html/testdata/webkit/tests11.dat diff --git a/html/testdata/webkit/tests12.dat b/internal/html/testdata/webkit/tests12.dat similarity index 100% rename from html/testdata/webkit/tests12.dat rename to internal/html/testdata/webkit/tests12.dat diff --git a/html/testdata/webkit/tests14.dat b/internal/html/testdata/webkit/tests14.dat similarity index 100% rename from html/testdata/webkit/tests14.dat rename to internal/html/testdata/webkit/tests14.dat diff --git a/html/testdata/webkit/tests15.dat b/internal/html/testdata/webkit/tests15.dat similarity index 100% rename from html/testdata/webkit/tests15.dat rename to internal/html/testdata/webkit/tests15.dat diff --git a/html/testdata/webkit/tests16.dat b/internal/html/testdata/webkit/tests16.dat similarity index 100% rename from html/testdata/webkit/tests16.dat rename to internal/html/testdata/webkit/tests16.dat diff --git a/html/testdata/webkit/tests17.dat b/internal/html/testdata/webkit/tests17.dat similarity index 100% rename from html/testdata/webkit/tests17.dat rename to internal/html/testdata/webkit/tests17.dat diff --git a/html/testdata/webkit/tests18.dat b/internal/html/testdata/webkit/tests18.dat similarity index 100% rename from html/testdata/webkit/tests18.dat rename to internal/html/testdata/webkit/tests18.dat diff --git a/html/testdata/webkit/tests19.dat b/internal/html/testdata/webkit/tests19.dat similarity index 100% rename from html/testdata/webkit/tests19.dat rename to internal/html/testdata/webkit/tests19.dat diff --git a/html/testdata/webkit/tests2.dat b/internal/html/testdata/webkit/tests2.dat similarity index 100% rename from html/testdata/webkit/tests2.dat rename to internal/html/testdata/webkit/tests2.dat diff --git a/html/testdata/webkit/tests20.dat b/internal/html/testdata/webkit/tests20.dat similarity index 100% rename from html/testdata/webkit/tests20.dat rename to internal/html/testdata/webkit/tests20.dat diff --git a/html/testdata/webkit/tests21.dat b/internal/html/testdata/webkit/tests21.dat similarity index 100% rename from html/testdata/webkit/tests21.dat rename to internal/html/testdata/webkit/tests21.dat diff --git a/html/testdata/webkit/tests22.dat b/internal/html/testdata/webkit/tests22.dat similarity index 100% rename from html/testdata/webkit/tests22.dat rename to internal/html/testdata/webkit/tests22.dat diff --git a/html/testdata/webkit/tests23.dat b/internal/html/testdata/webkit/tests23.dat similarity index 100% rename from html/testdata/webkit/tests23.dat rename to internal/html/testdata/webkit/tests23.dat diff --git a/html/testdata/webkit/tests24.dat b/internal/html/testdata/webkit/tests24.dat similarity index 100% rename from html/testdata/webkit/tests24.dat rename to internal/html/testdata/webkit/tests24.dat diff --git a/html/testdata/webkit/tests25.dat b/internal/html/testdata/webkit/tests25.dat similarity index 100% rename from html/testdata/webkit/tests25.dat rename to internal/html/testdata/webkit/tests25.dat diff --git a/html/testdata/webkit/tests26.dat b/internal/html/testdata/webkit/tests26.dat similarity index 100% rename from html/testdata/webkit/tests26.dat rename to internal/html/testdata/webkit/tests26.dat diff --git a/html/testdata/webkit/tests3.dat b/internal/html/testdata/webkit/tests3.dat similarity index 100% rename from html/testdata/webkit/tests3.dat rename to internal/html/testdata/webkit/tests3.dat diff --git a/html/testdata/webkit/tests4.dat b/internal/html/testdata/webkit/tests4.dat similarity index 100% rename from html/testdata/webkit/tests4.dat rename to internal/html/testdata/webkit/tests4.dat diff --git a/html/testdata/webkit/tests5.dat b/internal/html/testdata/webkit/tests5.dat similarity index 100% rename from html/testdata/webkit/tests5.dat rename to internal/html/testdata/webkit/tests5.dat diff --git a/html/testdata/webkit/tests6.dat b/internal/html/testdata/webkit/tests6.dat similarity index 100% rename from html/testdata/webkit/tests6.dat rename to internal/html/testdata/webkit/tests6.dat diff --git a/html/testdata/webkit/tests7.dat b/internal/html/testdata/webkit/tests7.dat similarity index 100% rename from html/testdata/webkit/tests7.dat rename to internal/html/testdata/webkit/tests7.dat diff --git a/html/testdata/webkit/tests8.dat b/internal/html/testdata/webkit/tests8.dat similarity index 100% rename from html/testdata/webkit/tests8.dat rename to internal/html/testdata/webkit/tests8.dat diff --git a/html/testdata/webkit/tests9.dat b/internal/html/testdata/webkit/tests9.dat similarity index 100% rename from html/testdata/webkit/tests9.dat rename to internal/html/testdata/webkit/tests9.dat diff --git a/html/testdata/webkit/tests_innerHTML_1.dat b/internal/html/testdata/webkit/tests_innerHTML_1.dat similarity index 100% rename from html/testdata/webkit/tests_innerHTML_1.dat rename to internal/html/testdata/webkit/tests_innerHTML_1.dat diff --git a/html/testdata/webkit/tricky01.dat b/internal/html/testdata/webkit/tricky01.dat similarity index 100% rename from html/testdata/webkit/tricky01.dat rename to internal/html/testdata/webkit/tricky01.dat diff --git a/html/testdata/webkit/webkit01.dat b/internal/html/testdata/webkit/webkit01.dat similarity index 100% rename from html/testdata/webkit/webkit01.dat rename to internal/html/testdata/webkit/webkit01.dat diff --git a/html/testdata/webkit/webkit02.dat b/internal/html/testdata/webkit/webkit02.dat similarity index 100% rename from html/testdata/webkit/webkit02.dat rename to internal/html/testdata/webkit/webkit02.dat diff --git a/html/token.go b/internal/html/token.go similarity index 99% rename from html/token.go rename to internal/html/token.go index b5a7caa..a4861bd 100644 --- a/html/token.go +++ b/internal/html/token.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" - "git.earlybird.gay/today-engine/html/atom" + "git.earlybird.gay/today-engine/internal/html/atom" ) // A TokenType is the type of a Token. diff --git a/html/token_test.go b/internal/html/token_test.go similarity index 100% rename from html/token_test.go rename to internal/html/token_test.go -- 2.39.5