René's URL Explorer Experiment


Title: Expose the `Utils.GetOutputString` as a public method for C# developers to work with `OutputRendering` · Issue #14387 · PowerShell/PowerShell · GitHub

Open Graph Title: Expose the `Utils.GetOutputString` as a public method for C# developers to work with `OutputRendering` · Issue #14387 · PowerShell/PowerShell

X Title: Expose the `Utils.GetOutputString` as a public method for C# developers to work with `OutputRendering` · Issue #14387 · PowerShell/PowerShell

Description: This issue is used to track the work to address the review comment #13758 (comment). This API may need to be public, so that other host implementations can strip off ANSI sequences the same way PowerShell does. All existing powershell ho...

Open Graph Description: This issue is used to track the work to address the review comment #13758 (comment). This API may need to be public, so that other host implementations can strip off ANSI sequences the same way Pow...

X Description: This issue is used to track the work to address the review comment #13758 (comment). This API may need to be public, so that other host implementations can strip off ANSI sequences the same way Pow...

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/14387

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Expose the `Utils.GetOutputString` as a public method for C# developers to work with `OutputRendering`","articleBody":"This issue is used to track the work to address the review comment https://github.com/PowerShell/PowerShell/pull/13758#discussion_r540412372. \r\n\r\n> This API may need to be public, so that other host implementations can strip off ANSI sequences the same way PowerShell does. All existing powershell hosts will need it when moving to PS 7.2, otherwise, their users will find `$PSStyle.OutputRendering` doesn't take effect. But I'm fine to expose the API in a separate PR. Let's open an issue to track it.\r\n>\r\n> There is a need, for sure! I have developed my own versions of this as there has been no API.\r\nI even think we should consider an API that doesn't just expose the implementation details but to think about what devs would like to do with it.\r\nOtherwise, everyone will have to invent that wheel over and over again.\r\n>\r\n>Another opportunity if you use methods is that you can determine if ANSI-output isn't enabled and then just bypass the decorations.\r\n\r\nI think maybe the following 2 APIs need to be made public\r\n- `Utils.GetOutputString` (overloads may be needed)\r\n  - The `isOutputRedirected` parameter needs to be revisited, at least its name. For a different host implementation, `Console.IsOutputRedirected == true` doesn't necessarily means it wants plain text. Think about the host of PS jupyter kernel in .NET Interactive, the process's output/error streams are always redirected to send to the frontend -- jupyter notebook, which is capable of handling ANSI sequences. So, in this case, even thought the std out/err are redirected, the ANSI sequences shouldn't be stripped off.\r\n- `Utils.GetFormatStyleString`\r\n  - This method currently directly check on `Console.IsErrorRedirected` and `Console.IsOutputRedirected`. I think we shouldn't directly check on those in PowerShell engine, but should instead have separate parameters for the caller to provide that information. The engine should not assume there is a console available, and it's up to the host implementation to pass in whether there is error/output redirection when calling this method.\r\n- ~`Utils.ShouldOutputPlainText` (not sure if this one needs to be public too, but should evaluate it)~ probably not needed to be public.","author":{"url":"https://github.com/daxian-dbw","@type":"Person","name":"daxian-dbw"},"datePublished":"2020-12-11T04:38:09Z","url":"https://github.com/PowerShell/PowerShell/issues/14387"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:61e28f63-765b-c9f2-3bea-fcde09c238c6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD54E:35277:503F0A:6F2EBA:6AFDE764
html-safe-noncee2aff80ca282195934d308a967bf3cd9d337a65c6a91db5868c624870491f3f0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTRFOjM1Mjc3OjUwM0YwQTo2RjJFQkE6NkFGREU3NjQiLCJ2aXNpdG9yX2lkIjoiNzM2MDQ1MzU3MDU2MDEyNDc3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0b06457536e05acdbc74f2b57a67d2942904dbd2fee80738cd21c2494b8b3df1
hovercard-subject-tagissue:761891521
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/14387/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0927a1d7766d32938e2f1fd6cb2bb4f3103ad2e2e73e8e3c562c2cf0c0ded141/PowerShell/PowerShell/issues/14387
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0927a1d7766d32938e2f1fd6cb2bb4f3103ad2e2e73e8e3c562c2cf0c0ded141/PowerShell/PowerShell/issues/14387
og:image:altThis issue is used to track the work to address the review comment #13758 (comment). This API may need to be public, so that other host implementations can strip off ANSI sequences the same way Pow...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedaxian-dbw
hostnamegithub.com
expected-hostnamegithub.com
None91ef1a291a064ac31ac459ab3f75261dbdd924c41ea5bd027e591c5b46cc9ce7
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released62bc98ce2346f4006e4a2810e9e22f37e7e6422
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/14387#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F14387
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F14387
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/14387
Reloadhttps://github.com/PowerShell/PowerShell/issues/14387
Reloadhttps://github.com/PowerShell/PowerShell/issues/14387
PowerShellhttps://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Codehttps://github.com/PowerShell/PowerShell
Issues1.3k (1.3k)https://github.com/PowerShell/PowerShell/issues
Pull requests366 (366)https://github.com/PowerShell/PowerShell/pulls
Discussionshttps://github.com/PowerShell/PowerShell/discussions
Actionshttps://github.com/PowerShell/PowerShell/actions
Projectshttps://github.com/PowerShell/PowerShell/projects
Security and quality3 (3)https://github.com/PowerShell/PowerShell/security
Insightshttps://github.com/PowerShell/PowerShell/insights
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/14387
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/14387
#16075https://github.com/PowerShell/PowerShell/pull/16075
Expose the Utils.GetOutputString as a public method for C# developers to work with OutputRenderinghttps://github.com/PowerShell/PowerShell/issues/14387#top
#16075https://github.com/PowerShell/PowerShell/pull/16075
https://github.com/SteveL-MSFT
Issue-Enhancementthe issue is more of a feature request than a bughttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Enhancement%22
Resolution-FixedThe issue is fixed.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Fixed%22
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
https://github.com/daxian-dbw
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
on Dec 11, 2020https://github.com/PowerShell/PowerShell/issues/14387#issue-761891521
#13758 (comment)https://github.com/PowerShell/PowerShell/pull/13758#discussion_r540412372
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get ahttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Question%22
on Dec 11, 2020https://github.com/PowerShell/PowerShell/issues/14387#event-4098431566
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Dec 11, 2020https://github.com/PowerShell/PowerShell/issues/14387#event-4098431910
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
Issue-Enhancementthe issue is more of a feature request than a bughttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Enhancement%22
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get ahttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Question%22
on Dec 11, 2020https://github.com/PowerShell/PowerShell/issues/14387#event-4098523980
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on Dec 11, 2020https://github.com/PowerShell/PowerShell/issues/14387#issuecomment-743371295
Ilya (iSazonov)https://github.com/iSazonov
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
on Dec 12, 2020https://github.com/PowerShell/PowerShell/issues/14387#event-4104082480
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#16075https://github.com/PowerShell/PowerShell/pull/16075
on Sep 10, 2021https://github.com/PowerShell/PowerShell/issues/14387#event-5285334791
Ilya (iSazonov)https://github.com/iSazonov
Resolution-FixedThe issue is fixed.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Fixed%22
on Sep 11, 2021https://github.com/PowerShell/PowerShell/issues/14387#event-5287795053
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/14387
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/14387
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Issue-Enhancementthe issue is more of a feature request than a bughttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Enhancement%22
Resolution-FixedThe issue is fixed.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Fixed%22
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.