x/pkgsite: consider moving to goldmark to handle issues in READMEs #39297
Comments
In case it's helpful, I ran into another case of incorrect table rendering, this time with no images in the table: correct on Github (snapshot), incorrect on pkg.go.dev (snapshot). |
The broken markdown tables for both packages (pdfcpu and parquet-go) seem to be caused by incorrectly formatted markdown, at least according to blackfriday (the external markdown parser pkg.go.dev uses). Note that Github-flavored-markdown (GFM), which Github uses, is not the same as regular markdown. Specifically,
There is a related discussion on #40203 about blackfriday and GFM. In particular, @zikaeroh suggested
I tried the above cases using goldmark, and in both cases, the table was identified and rendered properly by goldmark.
I think this, along with active maintenance (last commit was 6 days ago) and broader use among other Go projects, makes moving to goldmark a good idea. |
Change https://golang.org/cl/266579 mentions this issue: |
Code in motion. Preparing to generate new readme styles for the goldmark parser. For golang/go#39297 Change-Id: I506046ba36fdef6fa935b0600e1037e2d832ad24 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/266579 Trust: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org>
Change https://golang.org/cl/267117 mentions this issue: |
… code The overview file contains mostly legacy code used to construct the overview page. This change separates the goldmark code in preparation for updates that will generate a TOC for the readme and the future removal of all overview related code. For golang/go#39297 Change-Id: Ifa5d0ee3983478fd25c6c59fc1bd2c45457cc05c Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/267117 Run-TryBot: Jamal Carvalho <jamal@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> Trust: Jamal Carvalho <jamal@golang.org>
@hhrutter - this should be fixed. We made the switch to goldmark |
What is the URL of the page with the issue?
https://pkg.go.dev/mod/github.com/pdfcpu/pdfcpu
What is your user agent?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
Some images don't show up and there is also a markdown table that's screwed up.
The text was updated successfully, but these errors were encountered: