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

reStructuredText markup broken for Robot Framework code blocks #12484

Closed
mentalisttraceur opened this issue Nov 5, 2022 · 4 comments · Fixed by #12530
Closed

reStructuredText markup broken for Robot Framework code blocks #12484

mentalisttraceur opened this issue Nov 5, 2022 · 4 comments · Fixed by #12530
Assignees
Labels
bug 🐛 CSS/SCSS requires change to CSS/SCSS files UX/UI design, user experience, user interface

Comments

@mentalisttraceur
Copy link

mentalisttraceur commented Nov 5, 2022

Describe the bug
Project description written in reStructuredText; .. code:: robotframework blocks rendered with strikethrough on all the keyword arguments.

image

Example image from robotframework-dependencylibrary.

Expected behavior
No strikethrough in code blocks.

To Reproduce
Make a package with a reStructuredText description containing .. code:: robotframework blocks with at least one test calling at least one keyword with at least one argument, I presume.

@mentalisttraceur mentalisttraceur added bug 🐛 requires triaging maintainers need to do initial inspection of issue labels Nov 5, 2022
@mentalisttraceur
Copy link
Author

mentalisttraceur commented Nov 5, 2022

I'm pretty sure it has previously rendered correctly for years.

I've had that package with a lot of the same project description reStructuredText since December 2017, last looked at it around October 2021, and I think I would've noticed strikethrough in my code blocks.

@mentalisttraceur
Copy link
Author

mentalisttraceur commented Nov 5, 2022

The change to the generated HTML happened sometime between January 28 2022 and October 31 2022.

Note that my package didn't change between those two dates - it was version 3.0.1 both before and after.

In fact, if you go back to older package versions, you'll see that the rendering of every single release's description has been affected.

@mentalisttraceur
Copy link
Author

Looks like the HTML change was specifically <span class='s'>...</span> being replaced with <s>...</s>.

@miketheman miketheman added UX/UI design, user experience, user interface CSS/SCSS requires change to CSS/SCSS files and removed requires triaging maintainers need to do initial inspection of issue labels Nov 5, 2022
@miketheman
Copy link
Member

Thanks for the detailed report! I believe this is due to how the conversion from HTML4 to HTML5 elements worked along with the Pygments library setting for using short codes where 's' is used for a string, and it can also mean strike through.

Fixing this means a change to readme_renderer and the CSS here in warehouse to adapt.

@miketheman miketheman self-assigned this Nov 11, 2022
miketheman added a commit to miketheman/warehouse that referenced this issue Nov 11, 2022
When Pygments renders HTML, t uses the `<s>` tag for string literals,
which most browsers will interpret as a Strikethrough, which is
confusing.

Introduced during a fix for pypa/readme_renderer#262 and surfaced in
project pages since.

Fixes: pypi#12484

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@di di closed this as completed in #12530 Nov 11, 2022
di added a commit that referenced this issue Nov 11, 2022
When Pygments renders HTML, t uses the `<s>` tag for string literals,
which most browsers will interpret as a Strikethrough, which is
confusing.

Introduced during a fix for pypa/readme_renderer#262 and surfaced in
project pages since.

Fixes: #12484

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 CSS/SCSS requires change to CSS/SCSS files UX/UI design, user experience, user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants