docs: fix first heading rendering as paragraph on two template guides#69890
Merged
pkozlowski-opensource merged 2 commits intoJul 22, 2026
Merged
Conversation
The ng-container and binding template guide files each began with a UTF-8 BOM (EF BB BF) before the leading `#`. The docs markdown parser only promotes `#` to an H1 when it is the first character on the line, so the BOM demoted the title to paragraph text (`<p># ...</p>`) and the standard docs header (breadcrumbs, page title, edit button) never rendered. Stripping the BOM restores `#` as the first character, so both pages now generate the proper `<header class="docs-header">` block. Verified by rebuilding //adev/src/content/guide/templates:templates and inspecting the generated HTML. Fixes angular#69889
Member
|
Can we please add a compile time check for those characters ? |
|
Deployed adev-preview for 0748605 to: https://ng-dev-previews-fw--pr-angular-angular-69890-adev-prev-mh4gn84y.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
…h a BOM A leading UTF-8 byte order mark (U+FEFF) before the first `#` stops the Markdown parser from recognizing the heading, so the guide renders its title as a paragraph and drops the standard docs header. The character is invisible, so it cannot be caught in review. Add a check in the guides generation pipeline that throws when a source file starts with a BOM, failing the build with the offending file name. This sits alongside the existing unknown-anchor check and prevents the regression fixed in angular#69889 from recurring.
Contributor
Author
JeanMeche
approved these changes
Jul 22, 2026
Member
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.

Fixes #69889
Before:
After:
Urls:
https://angular.dev/guide/templates/ng-container
https://angular.dev/guide/templates/binding