google / gitiles

A simple browser for Git repositories.
https://gerrit.googlesource.com/gitiles/
Other
582 stars 174 forks source link

Wide code blocks trick Gitiles into not line-wrapping README.md #108

Closed ferdnyc closed 6 years ago

ferdnyc commented 7 years ago

Code blocks with very long lines can trick Gitiles into an extremely wide rendering of README.md on the project main page (only), forcing horizontal scrolling.

See e.g. https://swiftshader.googlesource.com/SwiftShader/ (where I discovered this), which contains a code block of 208 characters in a single line.

This is in contrast to Gitiles' own rendering of the same file (https://swiftshader.googlesource.com/SwiftShader/+/master/README.md, or even its embedding at the bottom of https://swiftshader.googlesource.com/SwiftShader/+/master), where the file is wrapped to browser width, and the code block is set overflow:scroll. This seems like a more useful view of the content, so it would be helpful if the file was rendered the same way when displayed on the project root.

ferdnyc commented 7 years ago

@cbd4feather I'm confused, that appears to be a bad URL. Were you intending to link to https://swiftshader.googlesource.com/SwiftShader/+/master ? If so, as I mentioned in my original report, the README.md renders fine there — it aways has.

or even its embedding at the bottom of https://swiftshader.googlesource.com/SwiftShader/+/master), where the file is wrapped to browser width, and the code block is set overflow:scroll.

It's only when the README.md is rendered at the project root https://swiftshader.googlesource.com/SwiftShader/ that it's not wrapped properly.

ferdnyc commented 6 years ago

It appears this was fixed at some point, as https://swiftshader.googlesource.com/SwiftShader/ is now wrapped normally.