-
Notifications
You must be signed in to change notification settings - Fork 75
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
Fix link to "Entropy (information theory)" Wikipedia entry #2566
Fix link to "Entropy (information theory)" Wikipedia entry #2566
Conversation
Make "Entropy and information theory" inline link compatible with older markdown implementations. fixes uccser#2565 Newer Markdown implementations (e.g. GitHub's as of this writing) properly render an inline link[0] whose link destination[1] includes parenthesis. Older ones fail, and, as a result, what should be rendered as: href="https://en.wikipedia.org/wiki/Entropy_(information_theory)" is instead rendered as: href="https://en.wikipedia.org/wiki/Entropy_(information_theory" (closing parenthesis elided/wrong URL) Wrapping the link destination within angle brackets solves that issue in a way that should be forward-compatible. [0] https://spec.commonmark.org/0.31.2/#inline-link [1] https://spec.commonmark.org/0.31.2/#link-destination
Thanks @mckzm for spotting and documenting this. Unfortunately, when visiting https://cs-field-guide.localhost/en/chapters/coding-introduction/further-reading/, I get a
Here is line 14 (offending line) of the template:
This could be a bug in verto, our markdown renderer, where it doesn't support this feature of markdown correctly. It's worth investigating. |
I've added a test to verto. It is a bug where links in <> are not rendered correctly. Your change should work, so once verto is fixed to support this markdown feature, I will approve your pull. @mckzm, in the meantime, could you please add yourself to the to the 'Community Contributors' section of csfieldguide/templates/appendices/contributors.html in this commit? |
Thanks @jimbonothing64. I have just added myself to the tail of the 'Community Contributors' list and updated the PR. I've found 5 more instances of the same "dangling paren" problem in various links - would you prefer me to file one issue & PR per instance, or group them all into a single one instead? |
Apologies for the delayed response. Your issue and pull request have raised some very interesting points and uncovered other interesting issues! At some point, verto should be updated to better support links; fixing verto requires more work/time than I'm can dedicate to this problem. @mckzm, we should move to your simpler solution, from #2565: replacing Could you please update your pull to replace both the initial link and also the extra 5 links you discovered? Thanks heaps! |
Switch link to Wikipedia's "Entropy (information theory)" page to use percent encoding for the inner parens: %28 for opening paren: ( %29 for closing paren: )
Update [Parity](https://en.wikipedia.org/wiki/Parity_(mathematics)) to use percent encoding for the inner parens.
Update [Wikipedia – Abstraction](https://en.wikipedia.org/wiki/Abstraction_(computer_science)) to use percent encoding for the inner parens
Update [The Battleship problem](https://en.wikipedia.org/wiki/Battleship_(puzzle)) to use percent encoding for the inner parens
Update [graph](https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)) to use percent encoding for the inner parens
Update [Ray tracing on Wikipedia](https://en.wikipedia.org/wiki/Ray_tracing_(graphics)) to percent encode the inner parens
@jimbonothing64 all done :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much! One link has a typo, once that's fixed I'll merge your changes in. Thanks again!
csfieldguide/chapters/content/en/software-engineering/sections/further-reading.md
Outdated
Show resolved
Hide resolved
Fix typo in percent encoding: &28 -> %28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Make "Entropy and information theory" inline link compatible with older markdown implementations.
fixes #2565
Newer Markdown implementations (e.g. GitHub's as of this writing) properly render an inline link[0] whose link destination[1] includes parenthesis. Older ones fail, and, as a result, what should be rendered as:
href="https://en.wikipedia.org/wiki/Entropy_(information_theory)"
is instead rendered as:
href="https://en.wikipedia.org/wiki/Entropy_(information_theory"
(closing parenthesis elided/wrong URL)
Wrapping the link destination within angle brackets solves that issue in a way that should be forward-compatible.
[0] https://spec.commonmark.org/0.31.2/#inline-link
[1] https://spec.commonmark.org/0.31.2/#link-destination
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request:
Checklist
Change the space in the box to an
x
for those you have completed.You can also fill these out after creating the pull request.
If you're unsure about any of them, don't hesitate to ask.
We're here to help!
This is simply a reminder of what we are going to look for before merging your change.
#???
in your description to reference an issue, where???
is the issue number).develop
branch.csfieldguide/templates/appendices/contributors.html
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc.
Feel free to add any images that might be helpful to understand the initial problem/solution.