Spectre.Console fixes markup crash when interpolating non-string values with brackets
Spectre.Console's interpolated markup methods only escaped square brackets in string values, so other objects whose ToString() output contained brackets, such as List`1[System.Int32], could trigger a markup parsing exception. The issue was reported as #1763 by @yaakov-h, and a fix was merged on 12 May 2026 as #2118. The new approach converts non-formattable objects to strings and escapes them before formatting, while leaving numbers, dates and other IFormattable values untouched. The change shipped in version 0.56.0, and the author notes that date formats containing brackets still behave differently by design.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in