Taco de Wolff

Results 171 comments of Taco de Wolff

There is a JS formatter already, the HTML/XML/SVG formatters are in the pipeline (specifically, building an AST from their sources which allows creating a formatter), and an improved CSS parser...

Excellent! To pretty-print JS you can do something along these lines: ``` import "github.com/tdewolff/parse/v2" import "github.com/tdewolff/parse/v2/js" func main() { input := []byte(...) ast, err := js.Parse(parse.NewInputBytes(input), js.Options{}) if err !=...

Awesome to hear, and thanks so much for sponsoring the project!!

Thanks for the suggestion, but I'm not clear on the advantages. Does the large API bother you? I don't think binary size is influenced much, or is it? I believe...

I see what you mean. Perhaps we should hide (lowercase) the following types: `Intersections SweepEvents SweepNode SweepPoint SweepStatus`. And on a second note, the `Path` type should be an array...

Looks good to me. I believe the SVG parser should be rewritten entirely, but in the meantime this suffices. Nitpick: you don't need to set x and y to zero...

In the meanwhile you could use https://pkg.go.dev/encoding/xml#Token to parse an SVG and find the `` elements, then use `ParseSVGPath` to append to the result.

I've noticed before that global maps can take a lot of space, but 150kB is quite a lot while the source code is only about 30kB (I suspect Go is...

See https://github.com/yuin/goldmark/discussions/469, relevant information copied here: Having large literal maps excessively inflates the resulting binary, see https://www.dolthub.com/blog/2023-06-16-static-map-initialization-in-go/ for more information. - Putting the map's contents in an array of `[]struct{key,...

Thanks Voisin. What's the difference between `+[s]` and `+s`?