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

Align definition of space characters with HTML5 #21

Closed
fred-wang opened this issue Feb 22, 2019 · 8 comments
Closed

Align definition of space characters with HTML5 #21

fred-wang opened this issue Feb 22, 2019 · 8 comments
Labels
compatibility Issues affecting backward compatibility css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification need specification update Issues requiring specification changes

Comments

@fred-wang
Copy link

"In MathML, white spaces are understood as XML spaces (U+0020), tabs
(U+0009), line feeds (U+000A), and carriage returns (U+000D) while HTML5
also includes "form feed" (U+000C).

https://www.w3.org/TR/html5/infrastructure.html#space-character"

originally reported at https://lists.w3.org/Archives/Public/www-math/2016Aug/0000.html

cc @rwlbuis

@fred-wang fred-wang added MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification labels Feb 22, 2019
@fred-wang
Copy link
Author

This is for MathML 4 but I think we eventually want to move the space definition to MathML Core.

@fred-wang fred-wang added the css / html5 Issues related to CSS or HTML5 interoperability label Feb 22, 2019
@davidcarlisle
Copy link
Collaborator

If using an html parser we should match html for whitespace, also I think we could probably always include U+000C in any mathml-specified white space handling for whitespace collapse etc, however any change in wording here needs to accommodate xml parsing, we can't can't change xml parse rules so for example

<mfrac> U+000C <mn>1</mn> U+000C <mn>1</mn> </mfrac>

is going to parse as text content in an mfrac if using an xml parser, and so be invalid.

@NSoiffer
Copy link
Contributor

What what it's worth... according to this whatwg doc, "Form feed characters are discouraged in XML 1.1". So saying don't use U+000C shouldn't be a big deal.

@fred-wang fred-wang added the compatibility Issues affecting backward compatibility label Mar 20, 2019
@NSoiffer
Copy link
Contributor

Resolved in 29/4/19 meeting to align with HTML5.

@fred-wang fred-wang reopened this May 2, 2019
@fred-wang
Copy link
Author

cc @bkardell

I reopened this since we to update the specs and to write WPT tests. I expect browsers already treat spaces as HTML5.

@fred-wang fred-wang added the need tests Issues related to writing WPT tests label May 6, 2019
@fred-wang fred-wang added need resolution Issues needing resolution at MathML Refresh CG meeting need implementation update need specification update Issues requiring specification changes and removed need resolution Issues needing resolution at MathML Refresh CG meeting labels May 16, 2019
@fred-wang
Copy link
Author

fred-wang commented May 16, 2019

Resolution:

@fred-wang
Copy link
Author

CSS definition is "A newline, U+0009 CHARACTER TABULATION, or U+0020 SPACE. "
https://www.w3.org/TR/css-syntax/#whitespace

And newline is
U+000A LINE FEED. Note that U+000D CARRIAGE RETURN and U+000C FORM FEED are not included in this definition, as they are converted to U+000A LINE FEED during preprocessing.

So it seems CSS agrees with HTML, if we take preprocessing into account.

@fred-wang
Copy link
Author

I believe in MathML Core this is only used for attribute trimming ( w3c/mathml-core#165 ), menclose@notation ( #104, #105 ) and maybe text nodes ( #28 ). So I think this is already covered by other issues and can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues affecting backward compatibility css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification need specification update Issues requiring specification changes
Projects
None yet
Development

No branches or pull requests

3 participants