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: remove extra margins before tags #3039

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

Onion-L
Copy link
Contributor

@Onion-L Onion-L commented Nov 4, 2024

Finds all HTML tags immediately following a line break (e.g., \n<div>) with a regular expression and removes those line breaks, making the HTML output more compact and removing unnecessary whitespace characters.

fix #3032

Copy link

netlify bot commented Nov 4, 2024

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit b3890a5
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/673327c586702d00088167ba

Copy link

netlify bot commented Nov 4, 2024

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit b3890a5
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/673327c52f255100084f0c0b
😎 Deploy Preview https://deploy-preview-3039--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shuuji3 shuuji3 force-pushed the fix/onion-l/extra-margin branch from 4e27bd9 to b3890a5 Compare November 12, 2024 10:02
Copy link
Member

@shuuji3 shuuji3 left a comment

Choose a reason for hiding this comment

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

Thank you for the fix! 🙂

Usually, newlines don't affect the rendering result but the post body has the whitespace-pre-wrap CSS property, and that causes extra spaces when they are within the <li> element.

<div class="status-body" whitespace-pre-wrap break-words :class="{ 'with-action': withAction }" relative>

This replacement can prevent such extra newlines in <li> tags.

@shuuji3 shuuji3 added this pull request to the merge queue Nov 24, 2024
Merged via the queue into elk-zone:main with commit e6ebde3 Nov 24, 2024
14 checks passed
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.

Hollo's post rendered with extra margins
2 participants