github-markdown-toc.go icon indicating copy to clipboard operation
github-markdown-toc.go copied to clipboard

fix: use `golang.org/x/net/html` to parse HTML instead of regular expressions

Open cgrindel opened this issue 1 year ago • 4 comments

Related to cgrindel/bazel-starlib#160

The HTML being returned by GitHub seems to have changed slightly. The regular expression was not working.

  • Update code to use html package to parse the HTML generated from the markdown.
  • Upgrade Go toolchain to 1.19.
  • Addressed deprecation warnings regarding use of io/ioutil.
  • Fixed malformed HTML in one of the tests.

cgrindel avatar Nov 07 '22 20:11 cgrindel