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

Format block MathML #34751

Merged
merged 2 commits into from
Jul 18, 2024
Merged

Format block MathML #34751

merged 2 commits into from
Jul 18, 2024

Conversation

pepelsbey
Copy link
Member

@pepelsbey pepelsbey commented Jul 10, 2024

⚠️ There’s a PR that adds margins to block-level math. They should be merged together.

TL;DR

Before

<math display="block"><semantics></semantics></math>

After

<math display="block">
  <semantics></semantics>
</math>

The same thing for all 73 files.

Description

When <math> is straightened in a single line, it’s treated as inline. Which is fine for inline-level math but not desirable for block-level math:

Text <math>…</math> text

<math display="block">…</math>
<p>Text <math></math> text</p>
<p><math display="block"></math></p>

To avoid unneeded paragraphs for block-level math, it’s now nested:

Text <math>…</math> text

<math display="block">
  …
</math>
<p>Text <math></math> text</p>
<math display="block"></math>

Before/after

Using this formula as an example:

before after

@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:WebAPI Web API docs Content:JS JavaScript docs Content:SVG SVG docs Content:Media Media docs Content:MathML MathML docs Content:Games Games docs size/l [PR only] 501-1000 LoC changed labels Jul 10, 2024
Copy link
Contributor

github-actions bot commented Jul 10, 2024

Preview URLs (73 pages)
Flaws (22)

Note! 69 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/RTCAudioSourceStats
Title: RTCAudioSourceStats
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/RTCAudioSourceStats/totalAudioEnergy
Title: RTCAudioSourceStats: totalAudioEnergy property
Flaw count: 2

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters
    • /en-US/docs/Web/API/RTCInboundRtpStreamStats/totalAudioEnergy does not exist

URL: /en-US/docs/Web/API/RTCIceCandidateStats/priority
Title: RTCIceCandidateStats: priority property
Flaw count: 1

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Web/API/RTCRtpCodecParameters

URL: /en-US/docs/Web/API/DOMMatrix
Title: DOMMatrix (WebKitCSSMatrix)
Flaw count: 18

  • macros:
    • /en-US/docs/Web/API/DOMMatrix/invertSelf does not exist
    • /en-US/docs/Web/API/DOMMatrix/is2D does not exist
    • /en-US/docs/Web/API/DOMMatrix/multiplySelf does not exist
    • /en-US/docs/Web/API/DOMMatrix/preMultiplySelf does not exist
    • /en-US/docs/Web/API/DOMMatrix/translateSelf does not exist
    • and 13 more flaws omitted

(comment last updated: 2024-07-15 11:50:03)

@pepelsbey pepelsbey closed this Jul 15, 2024
@pepelsbey pepelsbey deleted the format-block-mathml branch July 15, 2024 11:46
@pepelsbey pepelsbey restored the format-block-mathml branch July 15, 2024 11:47
@pepelsbey pepelsbey reopened this Jul 15, 2024
@pepelsbey pepelsbey marked this pull request as ready for review July 15, 2024 15:52
@pepelsbey pepelsbey requested review from a team as code owners July 15, 2024 15:52
@pepelsbey pepelsbey requested review from fred-wang, wbamberg and estelle and removed request for a team July 15, 2024 15:52
@pepelsbey pepelsbey requested review from dipikabh and bsmth and removed request for fred-wang, wbamberg and estelle July 15, 2024 15:52
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked through a lot of the diffs and cherry-picked about 10 preview pages and everything looks fine, so I would leave a +1 on the content changes.

@pepelsbey pepelsbey merged commit 761b904 into mdn:main Jul 18, 2024
8 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs Content:Games Games docs Content:JS JavaScript docs Content:MathML MathML docs Content:Media Media docs Content:SVG SVG docs Content:WebAPI Web API docs size/l [PR only] 501-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants