Repository navigation
Conversation
…n errors
A changelog entry whose title or description contains `{{hostname}}`
(or any double-brace template placeholder) triggers the substitution
parser when `ParseMarkdownStringAsync` re-parses the generated markdown.
Because the parser can't resolve the key, it emits an Error diagnostic.
That diagnostic's column is computed from the generated string, not from
the source file (`docs/release-notes.md`), so Errata crashes trying to
render a source label past the end of the line.
`RenderChangelogMarkdown` now replaces `{{` with `{{` before
returning. The HTML entity is invisible to the substitution parser
(which opens only on `{`), passes through Markdig as literal text, and
the browser decodes it back to `{{`. The visual output is unchanged.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4231/ |
There was a problem hiding this comment.
Requesting changes due to a medium-severity rendering regression noted inline.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
| // Escape {{ so it isn't re-processed as a substitution key when ParseMarkdownStringAsync | ||
| // re-parses this generated markdown. Changelog entry text (titles, descriptions) may | ||
| // contain template-placeholder syntax such as {{hostname}} that should render literally. | ||
| return sb.ToString().Replace("{{", "{{"); |
There was a problem hiding this comment.
[MEDIUM] Global {{ escaping changes code-span output
Replacing {{ across the entire generated markdown string also affects inline/fenced code content from changelog entries. For example, a title containing `{{hostname}}` is rewritten to `{{hostname}}` before markdown parsing; in code spans, entities are rendered literally, so output becomes {{hostname}} instead of {{hostname}}.
This fixes substitution parsing, but introduces a rendering regression for valid changelog content that uses code formatting.
Please scope escaping so it bypasses code spans/fences (or escape at field level with markdown-aware handling), and add a regression test for {{...}} inside inline code.
Changelog markdown is generated from GitHub PR/issue titles and
descriptions, not authored in docs-builder source files. Running it
through the full docs-builder pipeline causes substitution keys, MyST
roles, and the diagnostic link validator to fire on content that was
never intended to carry any of that syntax — the {{hostname}} build
failure is the direct example.
A dedicated ChangelogPipeline strips all docs-specific parsers:
no UseSubstitution, no role parsers, no UseDiagnosticLinks. It keeps
the structural elements the renderer actually uses (headings, lists,
emphasis, autolinks, pipe tables, directives for dropdowns) and calls
DisableHtml so raw HTML in descriptions does not bleed into the output.
The earlier {{}} → { escape workaround in RenderChangelogMarkdown
is removed — it is no longer needed.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
| .UseEmphasisExtras(EmphasisExtraOptions.Default) | ||
| .UsePipeTables() | ||
| .UseTaskLists() | ||
| .UseDirectives() |
There was a problem hiding this comment.
I'd remove this one, I don't think anyone will use actual directives in issue descriptions.
There was a problem hiding this comment.
is actually used for :::dropdown and maybe more stuff
There was a problem hiding this comment.
Requesting changes: the new changelog-specific pipeline introduces a regression where %-commented hidden links are no longer stripped during changelog re-parse.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
d31bhlox0wglh.cloudfront.net
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "d31bhlox0wglh.cloudfront.net"See Network Configuration for more information.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
| .UseEmphasisExtras(EmphasisExtraOptions.Default) | ||
| .UsePipeTables() | ||
| .UseTaskLists() | ||
| .UseDirectives() |
There was a problem hiding this comment.
[HIGH] Changelog pipeline now renders %-prefixed hidden links
ChangelogPipeline is used to re-parse changelog markdown, but unlike Pipeline it does not include UseComments(). Changelog rendering relies on % ... comment lines to hide private/suppressed PR and issue links (for example from FormatPrLink(..., hidePrivateLinks: true)), so those lines are no longer stripped and can render as visible links/text in the final HTML.
This is a behavior regression introduced by this change and can expose links that were intentionally hidden. Please add .UseComments() to ChangelogPipeline (or stop emitting % sentinels before markdown parse).
There was a problem hiding this comment.
No new findings in the latest revision.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Changelog markdown is generated from GitHub PR/issue titles and descriptions and re-parsed before rendering. Running that generated content through the full docs-builder pipeline causes substitution keys, MyST roles, and the diagnostic link validator to fire on text that was never intended to carry any of that syntax — the
{{hostname}}CI failure is the direct example.Affects: Release notes, Authoring
Prompt summary: The "build assembled documentation" CI job fails because a changelog entry title contains
{{hostname}}, which the substitution parser treats as an undefined key. The fix should prevent docs-specific parsers from running on generated changelog content.Why
DirectiveHtmlRendererre-parses the output ofChangelogInlineRendererusing the fullPipeline. That pipeline includesUseSubstitution, all MyST role parsers, andUseDiagnosticLinks. Changelog content originates from GitHub PR/issue titles — it is not docs-builder source and none of those parsers should apply to it. Any{{key}}in a PR title triggers an Error diagnostic attributed to the wrong file and column, which then crashes Errata's source renderer.What
ChangelogPipelineinMarkdownParserA new
public static ChangelogPipelineproperty strips every docs-specific extension: no substitution parser, no role parsers, no diagnostic link validator. It keeps the structural elements the changelog renderer actually uses — headings, lists, emphasis, autolinks, pipe tables, directives (for::::dropdownblocks), andDisableHtmlso raw HTML in descriptions cannot bleed through.DirectiveHtmlRendererusesChangelogPipelineThe parse and render calls for changelog blocks now pass
ChangelogPipelineinstead ofPipeline. No other call site is affected.Regression test
ChangelogDoubleBraceEscapeTestscreates a bundle entry whose title contains{{hostname}}and asserts zero errors and the literal text in the HTML output.Verify
🤖 Generated with Claude Code