Skip to content

Commit

Permalink
Fix links to manual changelogs.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Nov 5, 2024
1 parent 4f512a4 commit 2816632
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/642-changelog-link.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "Fix link to changelogs for collections without ``changelog.yaml`` (https://github.com/ansible-community/antsibull-build/pull/642)."
4 changes: 2 additions & 2 deletions src/antsibull_build/build_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ def render_md_table(headings: list[str], cells: list[list[str]]) -> str:

def format_link(title: str, url: str, text_format: TextFormat) -> str:
if text_format == TextFormat.RESTRUCTURED_TEXT:
return f"`{title} <{url}>`_"
return f"`{title} <{url}>`__"
if text_format == TextFormat.MARKDOWN:
return f"`[{title}]({url})"
return f"[{title}]({url})"
raise ValueError(f"Unknown format {format}")


Expand Down

0 comments on commit 2816632

Please sign in to comment.