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

fix(html): trim the first empty line in <pre> tag #90

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

yin1999
Copy link
Member

@yin1999 yin1999 commented Jan 21, 2025

Description

trim the first empty line in <pre> tag

Motivation

The adding of <code> tag makes the first empty line would not be ignored by User Agent, see the spec. Ref: mdn/yari#12364 (comment)

So trimming the first empty line in <pre> tag to simulate the semantics.

Related issues and pull requests

Fixes: mdn/yari#12364

Test: check the rendered html in /en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action:

Before:

image

After:

image

@fiji-flo
Copy link
Contributor

Great thanks for this I added a minor fix in yin1999#2

@fiji-flo fiji-flo merged commit 95f142f into mdn:main Jan 22, 2025
1 check passed
@yin1999 yin1999 deleted the fix-pre-empty-first-line branch January 22, 2025 08:31
This was referenced Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blank line in highlighted code
2 participants