From b223df2282b258c215eb1caac87f23ac401b9864 Mon Sep 17 00:00:00 2001 From: Codex CLI Date: Sat, 15 Aug 2026 19:31:42 +0000 Subject: [PATCH 01/15] chore(pre-commit): exclude vendor directory from checks --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index efcea228..c8a9d174 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,6 +5,7 @@ default_install_hook_types: default_stages: - pre-commit fail_fast: true +exclude: ^vendor/ repos: - repo: https://github.com/pre-commit/pre-commit-hooks From 7007c0ffa2222f339d4a7e13120188720e251c84 Mon Sep 17 00:00:00 2001 From: Codex CLI Date: Sat, 15 Aug 2026 19:31:49 +0000 Subject: [PATCH 02/15] =?UTF-8?q?chore(deps):=20=F0=9F=93=A6=20add=20html-?= =?UTF-8?q?to-markdown/v2=20and=20refresh=20vendored=20dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add html-to-markdown/v2 v2.5.2 for Html→Markdown description rendering in the boards work-item show command (issue #238 decision 16), along with the forced transitive upgrades (goldmark v1.8.2, golang.org/x/net v0.55.0, go-colorful v1.4.0). Drop spewerspew/spew: the --raw flags it served were removed repo-wide. --- go.mod | 11 +- go.sum | 40 +- .../spew => JohannesKaufmann/dom}/.gitignore | 13 +- .../github.com/JohannesKaufmann/dom/LICENSE | 21 + .../github.com/JohannesKaufmann/dom/README.md | 277 + .../github.com/JohannesKaufmann/dom/attr.go | 68 + .../github.com/JohannesKaufmann/dom/change.go | 49 + vendor/github.com/JohannesKaufmann/dom/dom.go | 88 + .../dom/dom_representation.go | 64 + .../github.com/JohannesKaufmann/dom/find.go | 49 + .../JohannesKaufmann/dom/neighbors.go | 108 + .../github.com/JohannesKaufmann/dom/tags.go | 147 + .../html-to-markdown/v2/.gitignore | 27 + .../html-to-markdown/v2/.goreleaser.yaml | 67 + .../html-to-markdown/v2/ESCAPING.md | 63 + .../html-to-markdown/v2/LICENSE | 21 + .../html-to-markdown/v2/README.md | 399 ++ .../html-to-markdown/v2/SECURITY.md | 6 + .../html-to-markdown/v2/WRITING_PLUGINS.md | 5 + .../html-to-markdown/v2/collapse/collapse.go | 174 + .../html-to-markdown/v2/collapse/is_node.go | 43 + .../v2/collapse/whitespace.go | 79 + .../html-to-markdown/v2/convert.go | 54 + .../html-to-markdown/v2/converter/convert.go | 142 + .../v2/converter/converter.go | 72 + .../html-to-markdown/v2/converter/ctx.go | 190 + .../html-to-markdown/v2/converter/escape.go | 89 + .../html-to-markdown/v2/converter/plugin.go | 22 + .../v2/converter/prioritized.go | 33 + .../html-to-markdown/v2/converter/register.go | 222 + .../html-to-markdown/v2/converter/render.go | 61 + .../html-to-markdown/v2/converter/status.go | 8 + .../html-to-markdown/v2/converter/url.go | 114 + .../v2/internal/domutils/add_space.go | 66 + .../v2/internal/domutils/adjacent.go | 75 + .../v2/internal/domutils/alternatives.go | 114 + .../v2/internal/domutils/domutils.go | 43 + .../v2/internal/domutils/empty_code.go | 42 + .../v2/internal/domutils/list_end_comment.go | 74 + .../v2/internal/domutils/list_items.go | 53 + .../v2/internal/domutils/redundant.go | 29 + .../v2/internal/domutils/span.go | 50 + .../v2/internal/domutils/swap.go | 51 + .../v2/internal/escape/elem_backslash.go | 9 + .../v2/internal/escape/elem_code.go | 45 + .../v2/internal/escape/elem_divider.go | 47 + .../v2/internal/escape/elem_header.go | 77 + .../v2/internal/escape/elem_image.go | 36 + .../v2/internal/escape/elem_italic_bold.go | 21 + .../v2/internal/escape/elem_list.go | 67 + .../v2/internal/escape/elem_quote.go | 23 + .../v2/internal/escape/replacer.go | 8 + .../v2/internal/escape/util.go | 70 + .../v2/internal/textutils/codefence.go | 61 + .../v2/internal/textutils/collapse_code.go | 31 + .../textutils/consecutive_newlines.go | 139 + .../v2/internal/textutils/delimiter.go | 37 + .../v2/internal/textutils/escape_multiline.go | 56 + .../v2/internal/textutils/prefix_lines.go | 16 + .../v2/internal/textutils/quote.go | 39 + .../internal/textutils/surrounding_spaces.go | 58 + .../html-to-markdown/v2/marker/marker.go | 34 + .../html-to-markdown/v2/plugin/base/base.go | 138 + .../v2/plugin/base/renderers.go | 62 + .../v2/plugin/commonmark/commonmark.go | 206 + .../v2/plugin/commonmark/handle_pre_render.go | 94 + .../v2/plugin/commonmark/handle_render.go | 47 + .../v2/plugin/commonmark/options.go | 130 + .../v2/plugin/commonmark/render_blockquote.go | 32 + .../plugin/commonmark/render_bold_italic.go | 39 + .../v2/plugin/commonmark/render_break.go | 12 + .../v2/plugin/commonmark/render_code.go | 149 + .../v2/plugin/commonmark/render_comment.go | 25 + .../v2/plugin/commonmark/render_divider.go | 15 + .../v2/plugin/commonmark/render_heading.go | 150 + .../v2/plugin/commonmark/render_image.go | 63 + .../v2/plugin/commonmark/render_link.go | 103 + .../v2/plugin/commonmark/render_list.go | 111 + .../v2/plugin/commonmark/validation.go | 101 + .../lucasb-eyer/go-colorful/CHANGELOG.md | 8 +- .../lucasb-eyer/go-colorful/README.md | 17 +- .../lucasb-eyer/go-colorful/hexcolor.go | 4 + .../lucasb-eyer/go-colorful/widegamut.go | 290 + vendor/github.com/spewerspew/spew/LICENSE | 16 - vendor/github.com/spewerspew/spew/README.md | 194 - vendor/github.com/spewerspew/spew/bypass.go | 144 - .../github.com/spewerspew/spew/bypasssafe.go | 40 - vendor/github.com/spewerspew/spew/common.go | 577 -- vendor/github.com/spewerspew/spew/config.go | 316 - vendor/github.com/spewerspew/spew/doc.go | 211 - vendor/github.com/spewerspew/spew/dump.go | 416 -- vendor/github.com/spewerspew/spew/format.go | 358 -- vendor/github.com/spewerspew/spew/hex.go | 146 - vendor/github.com/spewerspew/spew/spew.go | 175 - vendor/github.com/yuin/goldmark/.gitignore | 2 + vendor/github.com/yuin/goldmark/README.md | 6 + vendor/github.com/yuin/goldmark/ast/ast.go | 58 +- vendor/github.com/yuin/goldmark/ast/block.go | 93 +- vendor/github.com/yuin/goldmark/ast/inline.go | 104 +- .../goldmark/extension/ast/definition_list.go | 16 + .../yuin/goldmark/extension/ast/table.go | 1 + .../yuin/goldmark/extension/ast/tasklist.go | 1 + .../goldmark/extension/definition_list.go | 2 +- .../yuin/goldmark/extension/footnote.go | 2 +- .../yuin/goldmark/extension/linkify.go | 9 +- .../yuin/goldmark/extension/table.go | 22 +- .../yuin/goldmark/extension/typographer.go | 2 +- vendor/github.com/yuin/goldmark/markdown.go | 2 +- .../yuin/goldmark/parser/attribute.go | 18 +- .../yuin/goldmark/parser/atx_heading.go | 129 +- .../yuin/goldmark/parser/delimiter.go | 1 + .../yuin/goldmark/parser/fcode_block.go | 13 +- .../yuin/goldmark/parser/html_block.go | 3 - .../github.com/yuin/goldmark/parser/link.go | 23 +- .../yuin/goldmark/parser/link_ref.go | 72 +- .../github.com/yuin/goldmark/parser/list.go | 14 +- .../yuin/goldmark/parser/list_item.go | 4 +- .../yuin/goldmark/parser/paragraph.go | 7 +- .../github.com/yuin/goldmark/parser/parser.go | 73 +- .../yuin/goldmark/parser/raw_html.go | 6 +- .../yuin/goldmark/parser/setext_headings.go | 1 + .../yuin/goldmark/renderer/html/html.go | 34 +- .../yuin/goldmark/renderer/renderer.go | 14 +- .../yuin/goldmark/util/html5entities.go | 2 +- .../goldmark/util/unicode_case_folding.go | 2 +- vendor/github.com/yuin/goldmark/util/util.go | 88 +- vendor/golang.org/x/net/html/escape.go | 2 +- vendor/golang.org/x/net/html/iter.go | 2 - vendor/golang.org/x/net/html/node.go | 1 + .../golang.org/x/net/html/nodetype_string.go | 31 + vendor/golang.org/x/net/html/parse.go | 95 +- vendor/golang.org/x/net/html/render.go | 37 +- vendor/golang.org/x/net/html/token.go | 13 +- vendor/golang.org/x/net/idna/go118.go | 13 - .../x/net/idna/{idna10.0.0.go => idna.go} | 181 +- vendor/golang.org/x/net/idna/idna9.0.0.go | 717 --- vendor/golang.org/x/net/idna/pre_go118.go | 11 - vendor/golang.org/x/net/idna/punycode.go | 5 +- vendor/golang.org/x/net/idna/tables10.0.0.go | 4559 -------------- vendor/golang.org/x/net/idna/tables11.0.0.go | 4653 --------------- vendor/golang.org/x/net/idna/tables12.0.0.go | 4733 --------------- vendor/golang.org/x/net/idna/tables13.0.0.go | 4959 --------------- vendor/golang.org/x/net/idna/tables15.0.0.go | 2 +- vendor/golang.org/x/net/idna/tables17.0.0.go | 5302 +++++++++++++++++ vendor/golang.org/x/net/idna/tables9.0.0.go | 4486 -------------- vendor/golang.org/x/net/idna/trie12.0.0.go | 30 - vendor/golang.org/x/net/idna/trie13.0.0.go | 30 - vendor/modules.txt | 27 +- 148 files changed, 12201 insertions(+), 27198 deletions(-) rename vendor/github.com/{spewerspew/spew => JohannesKaufmann/dom}/.gitignore (53%) create mode 100644 vendor/github.com/JohannesKaufmann/dom/LICENSE create mode 100644 vendor/github.com/JohannesKaufmann/dom/README.md create mode 100644 vendor/github.com/JohannesKaufmann/dom/attr.go create mode 100644 vendor/github.com/JohannesKaufmann/dom/change.go create mode 100644 vendor/github.com/JohannesKaufmann/dom/dom.go create mode 100644 vendor/github.com/JohannesKaufmann/dom/dom_representation.go create mode 100644 vendor/github.com/JohannesKaufmann/dom/find.go create mode 100644 vendor/github.com/JohannesKaufmann/dom/neighbors.go create mode 100644 vendor/github.com/JohannesKaufmann/dom/tags.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/.gitignore create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/.goreleaser.yaml create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/ESCAPING.md create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/LICENSE create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/README.md create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/SECURITY.md create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/WRITING_PLUGINS.md create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/collapse/collapse.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/collapse/is_node.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/collapse/whitespace.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/convert.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/convert.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/converter.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/ctx.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/escape.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/plugin.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/prioritized.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/register.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/render.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/status.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/converter/url.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/add_space.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/adjacent.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/alternatives.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/domutils.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/empty_code.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/list_end_comment.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/list_items.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/redundant.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/span.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/domutils/swap.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/elem_backslash.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/elem_code.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/elem_divider.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/elem_header.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/elem_image.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/elem_italic_bold.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/elem_list.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/elem_quote.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/replacer.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/escape/util.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/textutils/codefence.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/textutils/collapse_code.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/textutils/consecutive_newlines.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/textutils/delimiter.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/textutils/escape_multiline.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/textutils/prefix_lines.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/textutils/quote.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/internal/textutils/surrounding_spaces.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/marker/marker.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/base/base.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/base/renderers.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/commonmark.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/handle_pre_render.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/handle_render.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/options.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_blockquote.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_bold_italic.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_break.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_code.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_comment.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_divider.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_heading.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_image.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_link.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/render_list.go create mode 100644 vendor/github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark/validation.go create mode 100644 vendor/github.com/lucasb-eyer/go-colorful/widegamut.go delete mode 100644 vendor/github.com/spewerspew/spew/LICENSE delete mode 100644 vendor/github.com/spewerspew/spew/README.md delete mode 100644 vendor/github.com/spewerspew/spew/bypass.go delete mode 100644 vendor/github.com/spewerspew/spew/bypasssafe.go delete mode 100644 vendor/github.com/spewerspew/spew/common.go delete mode 100644 vendor/github.com/spewerspew/spew/config.go delete mode 100644 vendor/github.com/spewerspew/spew/doc.go delete mode 100644 vendor/github.com/spewerspew/spew/dump.go delete mode 100644 vendor/github.com/spewerspew/spew/format.go delete mode 100644 vendor/github.com/spewerspew/spew/hex.go delete mode 100644 vendor/github.com/spewerspew/spew/spew.go create mode 100644 vendor/golang.org/x/net/html/nodetype_string.go delete mode 100644 vendor/golang.org/x/net/idna/go118.go rename vendor/golang.org/x/net/idna/{idna10.0.0.go => idna.go} (81%) delete mode 100644 vendor/golang.org/x/net/idna/idna9.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/pre_go118.go delete mode 100644 vendor/golang.org/x/net/idna/tables10.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables11.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables12.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables13.0.0.go create mode 100644 vendor/golang.org/x/net/idna/tables17.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables9.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/trie12.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/trie13.0.0.go diff --git a/go.mod b/go.mod index 93466750..cb0882aa 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.26 require ( github.com/AlecAivazis/survey/v2 v2.3.7 + github.com/JohannesKaufmann/html-to-markdown/v2 v2.5.2 github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/PuerkitoBio/purell v1.2.2 github.com/briandowns/spinner v1.23.2 @@ -23,7 +24,6 @@ require ( github.com/muesli/reflow v0.3.0 github.com/muesli/termenv v0.16.0 github.com/samber/lo v1.53.0 - github.com/spewerspew/spew v0.0.0-20230513223542-89b69fbbe2bd github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 github.com/stretchr/testify v1.11.1 @@ -32,11 +32,12 @@ require ( go.uber.org/zap v1.28.0 golang.org/x/sys v0.47.0 golang.org/x/term v0.45.0 - golang.org/x/text v0.40.0 + golang.org/x/text v0.41.0 gopkg.in/yaml.v3 v3.0.1 ) require ( + github.com/JohannesKaufmann/dom v0.3.1 // indirect github.com/alecthomas/chroma/v2 v2.20.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect @@ -56,16 +57,16 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/itchyny/timefmt-go v0.1.8 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/lucasb-eyer/go-colorful v1.3.0 // indirect + github.com/lucasb-eyer/go-colorful v1.4.0 // indirect github.com/mattn/go-runewidth v0.0.19 // indirect github.com/microcosm-cc/bluemonday v1.0.27 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - github.com/yuin/goldmark v1.7.13 // indirect + github.com/yuin/goldmark v1.8.2 // indirect github.com/yuin/goldmark-emoji v1.0.6 // indirect go.uber.org/multierr v1.10.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/net v0.38.0 // indirect + golang.org/x/net v0.55.0 // indirect ) diff --git a/go.sum b/go.sum index 8fb223f8..a934701c 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,9 @@ github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= +github.com/JohannesKaufmann/dom v0.3.1 h1:J16l9JAHWgkFPR3VIPbQ1gvS0cWab6laK1q7PFL3qh0= +github.com/JohannesKaufmann/dom v0.3.1/go.mod h1:BZPkf8ZeYrBgABjwJn9iiKt8aiCtkxpHkevms+Yp2DE= +github.com/JohannesKaufmann/html-to-markdown/v2 v2.5.2 h1:XFJZFWESIWlUEHHjzBuv8RvrtCWnSGlimEX17ysSDb8= +github.com/JohannesKaufmann/html-to-markdown/v2 v2.5.2/go.mod h1:BHWO8lJzttJLqwuV8Rb1B3OG2OSzLbssZDI1FRg2eAA= github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A= github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= @@ -81,14 +85,12 @@ github.com/itchyny/timefmt-go v0.1.8 h1:1YEo1JvfXeAHKdjelbYr/uCuhkybaHCeTkH8Bo79 github.com/itchyny/timefmt-go v0.1.8/go.mod h1:5E46Q+zj7vbTgWY8o5YkMeYb4I6GeWLFnetPy5oBrAI= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag= -github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= +github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.15 h1:+u9SLTRGnXv73cEsnsmoZBom+dMU88B2M0aDcWy0/jY= github.com/mattn/go-colorable v0.1.15/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4= -github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4= github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= @@ -115,8 +117,10 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/samber/lo v1.53.0 h1:t975lj2py4kJPQ6haz1QMgtId2gtmfktACxIXArw3HM= github.com/samber/lo v1.53.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= -github.com/spewerspew/spew v0.0.0-20230513223542-89b69fbbe2bd h1:csraKifkLpqDClUIbFTetjtraueL1KUhKBm6okL+ug4= -github.com/spewerspew/spew v0.0.0-20230513223542-89b69fbbe2bd/go.mod h1:cyGycBxnlCATLUv5jtPwaHnkiYomNWzXQougLmaCTzU= +github.com/sebdah/goldie/v2 v2.8.0 h1:dZb9wR8q5++oplmEiJT+U/5KyotVD+HNGCAc5gNr8rc= +github.com/sebdah/goldie/v2 v2.8.0/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= +github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= +github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -131,8 +135,8 @@ github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.7.13 h1:GPddIs617DnBLFFVJFgpo1aBfe/4xcvMc3SB5t/D0pA= -github.com/yuin/goldmark v1.7.13/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= +github.com/yuin/goldmark v1.8.2 h1:kEGpgqJXdgbkhcOgBxkC0X0PmoPG1ZyoZ117rDVp4zE= +github.com/yuin/goldmark v1.8.2/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= github.com/yuin/goldmark-emoji v1.0.6 h1:QWfF2FYaXwL74tfGOW5izeiZepUDroDJfWubQI9HTHs= github.com/yuin/goldmark-emoji v1.0.6/go.mod h1:ukxJDKFpdFb5x0a5HqbdlcKtebh086iJpI31LTKmWuA= github.com/zalando/go-keyring v0.2.8 h1:6sD/Ucpl7jNq10rM2pgqTs0sZ9V3qMrqfIIy5YPccHs= @@ -155,8 +159,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= +golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -165,30 +169,18 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= -golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4= -golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk= -golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc= -golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y= golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0= golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= -golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= -golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= -golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= -golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs= -golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY= +golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= +golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= diff --git a/vendor/github.com/spewerspew/spew/.gitignore b/vendor/github.com/JohannesKaufmann/dom/.gitignore similarity index 53% rename from vendor/github.com/spewerspew/spew/.gitignore rename to vendor/github.com/JohannesKaufmann/dom/.gitignore index 064a5d49..6f6f5e6a 100644 --- a/vendor/github.com/spewerspew/spew/.gitignore +++ b/vendor/github.com/JohannesKaufmann/dom/.gitignore @@ -1,3 +1,6 @@ +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# # Binaries for programs and plugins *.exe *.exe~ @@ -11,9 +14,9 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out -# Common files using profiling -*.cpu -*.mem - # Dependency directories (remove the comment below to include it) -# vendor/ \ No newline at end of file +# vendor/ + +# Go workspace file +go.work +go.work.sum diff --git a/vendor/github.com/JohannesKaufmann/dom/LICENSE b/vendor/github.com/JohannesKaufmann/dom/LICENSE new file mode 100644 index 00000000..56507dcc --- /dev/null +++ b/vendor/github.com/JohannesKaufmann/dom/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Johannes Kaufmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/JohannesKaufmann/dom/README.md b/vendor/github.com/JohannesKaufmann/dom/README.md new file mode 100644 index 00000000..bbc8ce6d --- /dev/null +++ b/vendor/github.com/JohannesKaufmann/dom/README.md @@ -0,0 +1,277 @@ +# dom + +[![Go Reference](https://pkg.go.dev/badge/github.com/JohannesKaufmann/dom.svg)](https://pkg.go.dev/github.com/JohannesKaufmann/dom) + +Helper functions for "net/html" that make it easier to interact with `*html.Node`. + +🚀 [Getting Started](#getting-started) - 📚 [Documentation](#documentation) - 🧑‍💻 [Examples](/examples/) + +## Installation + +```bash +go get -u github.com/JohannesKaufmann/dom +``` + +> [!NOTE] +> This "dom" libary was developed for the needs of the [html-to-markdown](https://github.com/JohannesKaufmann/html-to-markdown) library. +> That beeing said, please submit any functions that you need. + +## Getting Started + +```go +package main + +import ( + "fmt" + "log" + "strings" + + "github.com/JohannesKaufmann/dom" + "golang.org/x/net/html" +) + +func main() { + input := ` + + ` + + doc, err := html.Parse(strings.NewReader(input)) + if err != nil { + log.Fatal(err) + } + + // - - - // + + firstLink := dom.FindFirstNode(doc, func(node *html.Node) bool { + return dom.NodeName(node) == "a" + }) + + fmt.Println("href:", dom.GetAttributeOr(firstLink, "href", "")) +} +``` + +## Node vs Element + +The naming scheme in this library is: + +- "Node" means `*html.Node{}` + - This means _any_ node in the tree of nodes. +- "Element" means `*html.Node{Type: html.ElementNode}` + - This means _only_ nodes with the type of `ElementNode`. For example `

`, ``, ``, ... but not `#text`, ``, ... + +For most functions, there are two versions. For example: + +- `FirstChildNode()` and `FirstChildElement()` +- `AllChildNodes()` and `AllChildElements()` +- ... + +## Documentation + +[![Go Reference](https://pkg.go.dev/badge/github.com/JohannesKaufmann/dom.svg)](https://pkg.go.dev/github.com/JohannesKaufmann/dom) + +### Attributes & Content + +You can get the attributes of a node using `GetAttribute`, `GetAttributeOr` or the more specialized `GetClasses` that returns a slice of strings. + +For matching nodes, `HasID` and `HasClass` can be used. + +If you want to collect the #text of all the child nodes, you can call `CollectText`. + +```go +name := dom.NodeName(node) +// "h2" + +href := dom.GetAttributeOr(node, "href", "") +// "github.com" + +isHeading := dom.HasClass(node, "repo__name") +// `true` + +content := dom.CollectText(node) +// "Lorem ipsum" +``` + +--- + +### Children & Siblings + +You can already use `node.FirstChild` to get the first child _node_. For the convenience we added `FirstChildNode()` and `FirstChildElement()` which returns `*html.Node`. + +To get all direct children, use `AllChildNodes` and `AllChildElements` which returns `[]*html.Node`. + +- `PrevSiblingNode` and `PrevSiblingElement` + +- `NextSiblingNode` and `NextSiblingElement` + +### Find Nodes + +Searching for nodes deep in the tree is made easier with: + +```go +firstParagraph := dom.FindFirstNode(doc, func(node *html.Node) bool { + return dom.NodeName(node) == "p" +}) +// *html.Node + + +allParagraphs := dom.FindAllNodes(doc, func(node *html.Node) bool { + return dom.NodeName(node) == "p" +}) +// []*html.Node +``` + +- 🧑‍💻 [Example code, find](/examples/find/main.go) +- 🧑‍💻 [Example code, selectors](/examples/selectors/main.go) + +--- + +### Get next/previous neighbors + +What is special about this? The order! + +If you are somewhere in the DOM, you can call `GetNextNeighborNode` to get the next node, even if it is _further up_ the tree. The order is the same as you would see the elements in the DOM. + +```go +node := startNode +for node != nil { + fmt.Println(dom.NodeName(node)) + + node = dom.GetNextNeighborNode(node) +} +``` + +If we start the `for` loop at the `