fix(layout): add whitespace between html tag attributes - #2773
Merged
Merged
Conversation
cotes2020
requested changes
Jul 13, 2026
cotes2020
left a comment
Owner
There was a problem hiding this comment.
Why change the original code indentation?
Contributor
Author
The indentation was just my preference. It wasn't needed. I have changed it back to the original formatting. |
cotes2020
requested changes
Jul 13, 2026
Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Signed-off-by: Kuibin Lin <69464353+kuibinlin@users.noreply.github.com>
kuibinlin
force-pushed
the
fix/html-attr-whitespace
branch
from
July 15, 2026 03:15
ea63397 to
fe1745c
Compare
cotes2020
approved these changes
Jul 15, 2026
eshaanraval
pushed a commit
to eshaanraval/novismos
that referenced
this pull request
Sep 16, 2026
eshaanraval
pushed a commit
to eshaanraval/novismos
that referenced
this pull request
Sep 16, 2026
eshaanraval
pushed a commit
to eshaanraval/novismos
that referenced
this pull request
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Description
The
<html>element in_layouts/default.htmlrenders its attributes without a separating space, producing invalid HTML:Running
htmlproofer --check-htmlreports:(See #2765.)
Root cause
The whitespace-trim markers introduced in
7496dd4remove all whitespace around thedata-bs-themeconditional, including the required separator between thelanganddata-bs-themeattributes:{%- if site.theme_mode == 'light' or site.theme_mode == 'dark' -%} data-bs-theme="{{ site.theme_mode }}" {%- endif -%}Fix
Trim only the newline before the conditional while emitting an explicit space before
data-bs-theme:The generated output is now valid:
When
theme_modeis unset (the default/auto mode), thedata-bs-themeattribute is still omitted:There is no behavioral change—this fix only restores the required whitespace between attributes when a theme mode is configured.
Testing
Built the site with:
Verified that the generated
<html>tag contains valid whitespace between thelanganddata-bs-themeattributes.Additional context
Fixes #2765.