Bug #80563 MySQL Documentation Does Not Preserve Whitespace in Bare code Tags
Submitted: 29 Feb 2016 20:04 Modified: 2 Mar 2016 16:06
Reporter: Jonathan Champ Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[29 Feb 2016 20:04] Jonathan Champ
Description:
Whitespace in web browsers is not preserved by default. Thus, string literals are being displayed incorrectly when the whitespace is intentional.

How to repeat:
Example: https://dev.mysql.com/doc/refman/5.7/en/char.html
The value of an empty CHAR(4) should be '    ' (4 spaces), but currently displays as ' ' (1 space).

Suggested fix:
Add "white-space: pre;" to your favorite <code> CSS selector. It looks like you're currently using "div.chapter code,div.section code" for the mono-spaced font aspect.
[1 Mar 2016 5:54] MySQL Verification Team
Hello Jonathan Champ,

Thank you for the report.

Thanks,
Umesh
[2 Mar 2016 16:06] Stefan Hinz
Posted by developer:
 
Thanks for reporting this issue! It occurred due to a change in October last year when we started replacing \u00a0 with regular space characters in an attempt to make the website more mobile-friendly (\u00a0 can cause long lines that are cut off in 320px devices). Now we're doing this more selectively, and things like '    ' (4 spaces) are preserved again as they should.