Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix changed-in partial when used with multiple paragraphs #2006

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

zecakeh
Copy link
Contributor

@zecakeh zecakeh commented Nov 19, 2024

When used with a text that includes multiple paragraphs, the partial created invalid HTML by nesting <p> elements. It also changed the rendering by making "Changed in vX.XX:" a separate paragraph, when it is inline with a single paragraph.

To change that we do as with "Required" and prepend "Changed in vX.XX:" to the text before it is rendered, making it inline with the first paragraph.

Example: in the POST /_matrix/client/v3/join/{roomIdOrAlias}'s request definition:

Before:

image

After:

image

Pull Request Checklist

Preview: https://pr2006--matrix-spec-previews.netlify.app

When used with a text that includes multiple paragraphs, the partial created invalid HTML by nesting `<p>` elements.
It also changed the rendering by making "Changed in vX.XX:" a separate paragraph, when it is inline with a single paragraph.

To change that we do as with "Required" and add "Changed in vX.XX:" to the text before it is rendered, making it inline with the first paragraph.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@zecakeh zecakeh requested a review from a team as a code owner November 19, 2024 11:04
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@richvdh richvdh merged commit c5eac01 into matrix-org:main Nov 26, 2024
12 checks passed
@zecakeh zecakeh deleted the changed-in-multiple-p branch November 26, 2024 19:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants