Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Adds a default table view for
System.Text.Runeso it displays the characteralongside its Unicode code point, instead of a property dump.
Before:
After:
PR Context
Fixes PowerShell#27595.
Runehas no default view, so it falls back to listing its properties. Noneof them show the character itself, which makes the output unhelpful for the
type's main purpose — you cannot tell that 65 is
Aor that 128512 is anemoji without decoding by hand.
[char]65already displays asA, so thisbrings
Runein line.Implemented as a
TableControlview inDotNetTypes_format_ps1xml.cs,following the existing pattern used for other simple value types such as
System.Guid. Uses a script-block column because the display string iscomputed from
ToString()andValuerather than read from a singleproperty.
Note this changes rendered output for
Rune, so anything parsing the currentproperty-list rendering would see different text.
Tests added in
test/powershell/engine/Formatting/Rune.Tests.ps1covering anASCII rune and a non-BMP rune.
Note
AI assistance was used in preparing this change.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header