From 7984e7ec6ec68e10f3d388324154cc9de449aa44 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 29 Jun 2025 22:50:44 -0600 Subject: [PATCH] fix(util): fixes no-op log output when commit message contains square-brackets Resolves: #1251 --- src/semantic_release/cli/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/semantic_release/cli/util.py b/src/semantic_release/cli/util.py index 0f62d3d10..37d249c1a 100644 --- a/src/semantic_release/cli/util.py +++ b/src/semantic_release/cli/util.py @@ -9,6 +9,7 @@ from typing import Any import rich +import rich.markup import tomlkit from tomlkit.exceptions import TOMLKitError @@ -26,8 +27,7 @@ def noop_report(msg: str) -> None: Rich-prints a msg with a standard prefix to report when an action is not being taken due to a "noop" flag """ - fullmsg = "[bold cyan][:shield: NOP] " + msg - rprint(fullmsg) + rprint(f"[bold cyan][:shield: NOP] {rich.markup.escape(msg)}") def indented(msg: str, prefix: str = " " * 4) -> str: