Skip to content

[Changelog] Remove unnecessary square brackets - #3639

Merged
lcawl merged 1 commit into
mainfrom
changelog-directive-fixes
Jul 10, 2026
Merged

lcawl merged 1 commit into
mainfrom
changelog-directive-fixes

Conversation

@lcawl

@lcawl lcawl commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #3638

Screenshots

Before

image

After

image

Summary

In flattened separated-type output (deprecations, breaking changes, etc. without :dropdowns:), GetLinksText wrapped already-formatted markdown links in an extra [...]:

return linksParts.Count > 0 ? string.Join(" ", linksParts) : string.Empty;

FormatPrLink / FormatIssueLink already return [#N](url), so the outer wrapper produced invalid markdown like [ [#268942](url), [#202446](url) ], which rendered as literal [#268942, #202446].

Fix

GetLinksText now space-joins links, matching RenderEntryLinks and IndexMarkdownRenderer.

Test added

tests/Elastic.Markdown.Tests/Directives/ChangelogFlattenedLinksTests.cs — a deprecation entry with two PRs and one issue, asserting:

  • Markdown contains proper [#N](url) links
  • No [ [#N] wrapper or [#N, #M] literal text
  • HTML contains clickable href attributes

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No
  1. If you answered "Yes" to the previous question, please specify the tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).

Tool(s) and model(s) used: composer-2.5-fast

@lcawl lcawl added the fix label Jul 10, 2026
@lcawl
lcawl marked this pull request as ready for review July 10, 2026 18:14
@lcawl
lcawl requested a review from a team as a code owner July 10, 2026 18:14
@lcawl
lcawl requested a review from reakaleek July 10, 2026 18:14
@lcawl
lcawl merged commit 8151eee into main Jul 10, 2026
25 checks passed
@lcawl
lcawl deleted the changelog-directive-fixes branch July 10, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changelog directive renders unnecessary square brackets

2 participants