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

Open
x448 opened this issue Feb 24, 2020 · 5 comments
Labels
Milestone

Comments

@x448
Copy link

@x448 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. |
@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Feb 24, 2020

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
@fxamacker fxamacker mentioned this issue Feb 25, 2020
10 of 11 tasks complete
@x448
Copy link
Author

@x448 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
Contributor

@julieqiu julieqiu commented Feb 28, 2020

@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 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.