Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: README.md shows non-breaking space and non-breaking hyphen as   and ‑ strings #37394

Closed
x448 opened this issue Feb 24, 2020 · 6 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development pkgsite

Comments

@x448
Copy link

x448 commented Feb 24, 2020

This makes correct text look like it has typos when viewed by prospective employers, etc. on go.dev.

GitHub doesn't have any problems and you can see the difference in the screenshots.

Here's a screenshot from go.dev, from github.com, and the markdown code.

/cc @julieqiu @dmitshur

What did you see? (go.dev screenshot)

Problems in the screenshot include:

Preferred serialization
Well‑formedness checks
RFC 7049 Section 8 Security Considerations.

image

What did you expect to see? (github.com screenshot)

image

Reproducer (markdown snippet)

This is from fxamacker/cbor. The   and ‑ allow the text to avoid messy line breaks in the "CBOR Feature" column. The last row of "Description" is also a problem on go.dev.

|     | CBOR Feature | Description |
| --- | :--- | :--- |
| ✔️ | CBOR tags | API supports built-in and user-defined tags. |
| ✔️ | Preferred serialization | Integers encode to fewest bytes. Optional float64→float32→float16 if value fits. |
| ✔️ | Sort map keys | Unsorted, length-first (Canonical CBOR), and bytewise-lexicographic (CTAP2) |
| ✔️ | Duplicate map keys | Always forbid for encoding, option to allow/forbid for for decoding. |
| ✔️ | Indefinite length data | Option to allow/forbid for encoding and decoding. |
| ✔️ | Well‑formedness checks | Always checked and enforced. |
| ✔️ | Basic validity checks | UTF-8 validity, etc. checked after well-formedness. |
| ✔️ | Security considerations | Prevent integer overflow and resource exhaustion described in RFC 7049 Section 8 Security Considerations. |
@gopherbot gopherbot added this to the Unreleased milestone Feb 24, 2020
@julieqiu julieqiu added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 24, 2020
@julieqiu
Copy link
Member

Thanks for reporting! We're working on fixes for this and other README rendering issues.

fxamacker pushed a commit to fxamacker/cbor that referenced this issue Feb 25, 2020
Replaced a handful of markdown tables with SVG: "cbor speed/memory comparison", "cbor security comparison", "cbor features" and one more.

There's a lot of markdown tables remaining (encoding/decoding option tables, etc.) that are being rendered incorrectly on go.dev.

Mentioned the bug fix for v2.2, and CBOR  decoder settings: `MaxNestedLevels`, `MaxArrayElements`, `MaxMapPairs`, and `IndefLength`.

go.dev bugs filed about this are:
golang/go#37284
golang/go#37394

Closes #175
@x448
Copy link
Author

x448 commented Feb 28, 2020

Julie, I appreciate your reply and your work trying to fix this.

I'm just sharing this with you in case there's anyone on your team that's under the impression there's a workaround available.

There is no workaround for this issue and #37284 because go.dev shows all past releases.

I don't think there's anything maintainers can do to make fxamacker/cbor v2.2.0 and prior versions render correctly on go.dev. All maintainers can do is continue converting a dozen markdown tables to svg, and etc. so that v2.3.0 can look nice on go.dev.

I hope you're having a great day and know that lots of people outside of Google also appreciate & value your work!

@julieqiu
Copy link
Member

@x448 - Thanks for the feedback, and I am happy to hear that you are enjoying using pkg.go.dev!

I understand the README issues have been frustrating - I have a fix in review for #37284, which I hope to have live next week, and am currently looking into this issue.

We are also working towards open sourcing the site (https://groups.google.com/g/golang-dev/c/mfiPCtJ1BGU/m/OZ9cU3SgBgAJ), so that in the future we can accept contributions for issues like this.

I'll update this issue once the fix has been merged, and also when it is live on the site. Thanks for being patient, and hope this helps!

@x448
Copy link
Author

x448 commented Feb 29, 2020

Hey Julie, this is fantastic news! Thanks so much for letting me know and sharing as much info as you did! I think @fxamacker and others will appreciate it as well.

Open sourcing pkg.go.dev is a really great decision. I heard a rumor that might be happening so this confirmation is really nice. Revenue generating features could simply build on top of it so it's smart.

Thanks again for coming to the rescue on the two issues. Seeing dmitshur give you a thumbs up on your comment made me happy too. Have a fantastic weekend!

@x448
Copy link
Author

x448 commented Mar 11, 2020

Hi! I discovered this problem is not limited to tables.

This can be seen by bringing up the README of fxamacker/cbor v2.1.0 (not latest version) on go.dev and searching for nbsp (it's in the Comparisons section).

FYI - (you probably know about this) GitHub Flavored Markdown Spec highlights where they differ from regular markdown and also includes 650+ examples/tests.

p.s.

Julie's fix for #37284 not only worked but it's is beautiful!

@julieqiu julieqiu changed the title go.dev: README.md shows non-breaking space and non-breaking hyphen as   and ‑ strings x/pkgsite: README.md shows non-breaking space and non-breaking hyphen as   and ‑ strings Jun 15, 2020
@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/frontend Aug 27, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
@jamalc jamalc self-assigned this Nov 18, 2020
@jamalc
Copy link

jamalc commented Nov 18, 2020

@x448 - this should now be fixed.

@jamalc jamalc closed this as completed Nov 18, 2020
@golang golang locked and limited conversation to collaborators Nov 18, 2021
@hyangah hyangah added the pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development label May 20, 2022
@rsc rsc unassigned jamalc Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development pkgsite
Projects
None yet
Development

No branches or pull requests

5 participants