-
Notifications
You must be signed in to change notification settings - Fork 3
Are line breaks in examples ok? #18
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
Comments
It was not clear to me what is the issue that was brought up here. If it is about text transform within the ruby element it should be no different from normal text I suppose? |
@kidayasuo when HTML source code is parsed, line breaks may be converted to spaces in the rendered output. For example, there is no space at the end of the first line below
but it is rendered
This test shows that Gecko, Blink, & WebKit engines add spaces when there are newlines between ruby elements, and Gecko adds a space to the rendered rt when ruby base 'a' is followed by a newline (but not Blink or WebKit). ![]() I tested the examples in the spec and found the following for Firefox, but not for Chrome or Safari). I can't remember which is expected, since i seem to vaguely remember that some space handling was introduced at some point to manage Latin annotations. I wasn't keen to work through all the logic – it may be easier to just change the examples...
hope that helps clarify |
I am thinking that this is a bit of a can of worms, and more over a layout can of worms, so it maybe be preferable to rewrite those examples either not to have line breaks at all, or at least to make sure all line breaks and spaces are inter-element spaces, and not within individual bases or individual annotations. Make it into a one liner:
Either make it into a one-liner, or close
|
Thank you for the clarification. A new line after the base character "a" results in adding a space to the content of the rt element seems like a bug to me (regardless of if it comes from the spac or the implementation)…… |
Yes, that's what i was thinking, too. |
This avoids getting into the (fairly complicated) discussion of white space processing where that's not relevant. See #18
Addressed by 657377b |
Various examples in the spec use line breaks to make it easier to read the markup. I remember that we had to remove those line breaks in the early days, since they would distort the rendered output when converted to spaces. I think there was some discussion about use of line breaks subsequently, but i can't remember where we stand at the moment. Perhaps this is described in the HTML spec, but does it apply equally to all styles of markup that are possible with ruby (eg. ones that don't have an rb element)?
I don't think the spec mentions this, either, should it?
The text was updated successfully, but these errors were encountered: