René's URL Explorer Experiment


Title: Comment Based Help Keywords and Their Parameters Not Highlighting Correctly · Issue #194 · PowerShell/EditorSyntax · GitHub

Open Graph Title: Comment Based Help Keywords and Their Parameters Not Highlighting Correctly · Issue #194 · PowerShell/EditorSyntax

X Title: Comment Based Help Keywords and Their Parameters Not Highlighting Correctly · Issue #194 · PowerShell/EditorSyntax

Description: Environment Editor and Version (VS Code, Atom, Sublime): VS Code 1.41.1 OS: Windows 10 PowerShell: 5.1 Theme: Dark+ I tested the code snippet below with all extensions disabled using both the stable and preview versions of the PowerShell...

Open Graph Description: Environment Editor and Version (VS Code, Atom, Sublime): VS Code 1.41.1 OS: Windows 10 PowerShell: 5.1 Theme: Dark+ I tested the code snippet below with all extensions disabled using both the stabl...

X Description: Environment Editor and Version (VS Code, Atom, Sublime): VS Code 1.41.1 OS: Windows 10 PowerShell: 5.1 Theme: Dark+ I tested the code snippet below with all extensions disabled using both the stabl...

Opengraph URL: https://github.com/PowerShell/EditorSyntax/issues/194

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Comment Based Help Keywords and Their Parameters Not Highlighting Correctly","articleBody":"### Environment\r\n\r\n- Editor and Version (VS Code, Atom, Sublime): VS Code 1.41.1\r\n- OS: Windows 10\r\n- PowerShell: 5.1\r\n- Theme: Dark+\r\n\r\nI tested the code snippet below with all extensions disabled using both the stable and preview versions of the PowerShell extension.  In all cases the behavior was the same.\r\n\r\n### Issue Description\r\n\r\nThe following keywords and their parameters used in the Comment-Based-Help section of \r\na script or module not highlight correctly when compared to the other keywords that do not take parameters nor consistently when compared the .PARAMETER keyword.\r\n\r\n.LINK\r\n.FORWARDHELPTARGETNAME\r\n.FORWARDHELPCATEGORY\r\n.REMOTEHELPRUNSPACE\r\n.EXTERNALHELP\r\n\r\nThe one keyword that does seem to at least partially work is the .PARAMETER keyword. It only highlights as a keyword if it has the required parameters and both the keyword and parameters highlight as the same type of syntax. (same color)\r\n\r\nI was able to manually edit the powershell.tmLanguage.json file to get the highlighting to work but adjusting the moving all the keywords to the second \"captures\" under \"commentEmbeddedDocs\" and making some edits to the regex statement to include characters needed to create URI patterns.\r\n\r\nWhen working against my local files I also created a new third \"captures\" group and moved the .FORWARDHELPCATEGORY to that group and added the regex to test for the list of valid categories that the keyword would take: (Alias|Cmdlet|HelpFile|Function|Provider|General|FAQ|Glossary|ScriptCommand|ExternalScript|Filter|All)\r\n\r\nI don't have the knowledge to do the pull and edit XML and do the regression testing.  I can test if someone is able to make the edits.\r\n\r\n#### Screenshots\r\n![image](https://user-images.githubusercontent.com/39203582/73134335-432ad880-3fea-11ea-8625-c98dcd561746.png)\r\n\r\n![image](https://user-images.githubusercontent.com/39203582/73134337-4b831380-3fea-11ea-9274-8f49eb6a0880.png)\r\n\r\n### Expected Behavior\r\n\r\nThe keywords would highlight as comments if they did not have the required parameters (the \".PARAMETER\" keyword is the only one that currently works) and the keywords and parameters would both highlight as keywords, as the \".PARAMETER\" keyword and parameter does now or highlight as a keyword and parameter with two different colors.\r\n\r\n### Code Samples - Snippet:\r\n```powershell\r\nfunction verb-noun {\r\n\r\n    \u003c#\r\n        .SYNOPSIS\r\n            A brief description of the function or script.\r\n            This keyword can be used only once in each topic.\r\n\r\n        .DESCRIPTION\r\n            A detailed description of the function or script.\r\n            This keyword can be used only once in each topic.\r\n\r\n        .EXAMPLE\r\n            A sample command that uses the function or script, optionally followed by sample output and a description.\r\n            Repeat this keyword for each example.\r\n\r\n        .INPUTS\r\n            The Microsoft .NET Framework types of objects that can be piped to the function or script.\r\n            You can also include a description of the input objects.\r\n\r\n        .OUTPUTS\r\n            The .NET Framework type of the objects that the cmdlet returns.\r\n            You can also include a description of the returned objects.\r\n\r\n        .NOTES\r\n            Additional information about the function or script.\r\n\r\n        .COMPONENT\r\n            The technology or feature that the function or script uses, or to which it is related.\r\n            This content appears when the Get-Help command includes the Component parameter of Get-Help.\r\n\r\n        .ROLE\r\n            The user role for the help topic.\r\n            This content appears when the Get-Help command includes the Role parameter of Get-Help.\r\n\r\n        .FUNCTIONALITY\r\n            The intended use of the function.\r\n            This content appears when the Get-Help command includes the Functionality parameter of Get-Help.\r\n\r\n        .PARAMETER Inputs\r\n            The description of a parameter. Add a keyword for each parameter in the function or script syntax.\r\n\r\n            Type the parameter name on the same line as the keyword. Type the parameter description on the lines following the keyword.\r\n\r\n            Windows PowerShell interprets all text between the keyword line and the next keyword or the end of the comment block as part of the parameter description.\r\n            The description can include paragraph breaks.\r\n\r\n            The Parameter keywords can appear in any order in the comment block, but the function or script syntax determines the order in which the parameters (and their descriptions) appear in help topic.\r\n            To change the order, change the syntax.\r\n\r\n            You can also specify a parameter description by placing a comment in the function or script syntax immediately before the parameter variable name.\r\n            If you use both a syntax comment and a Parameter keyword, the description associated with the Parameter keyword is used, and the syntax comment is ignored.\r\n\r\n        .LINK https://www.example.com/\r\n            The name of a related topic. The value appears on the line below the '.LINK' keyword and must be preceded by a comment symbol # or included in the comment block.\r\n            Repeat the keyword for each related topic. This content appears in the Related Links section of the help topic. \r\n            The keyword content can also include a Uniform Resource Identifier (URI) to an online version of the same help topic.\r\n            The online version opens when you use the Online parameter of Get-Help. The URI must begin with 'http' or 'https'.\r\n\r\n        .FORWARDHELPTARGETNAME Get-Help\r\n            Redirects to the help topic for the specified command.\r\n            You can redirect users to any help topic, including help topics for a function, script, cmdlet, or provider.\r\n\r\n        .FORWARDHELPCATEGORY All\r\n            Specifies the help category of the item in 'ForwardHelpTargetName'.\r\n            Valid values are 'Alias', 'Cmdlet', 'HelpFile', 'Function', 'Provider', 'General', 'FAQ', 'Glossary', 'ScriptCommand', 'ExternalScript', 'Filter', or 'All'.\r\n            Use this keyword to avoid conflicts when there are commands with the same name.\r\n\r\n        .REMOTEHELPRUNSPACE PSSessionVariable\r\n            Specifies a session that contains the help topic. Enter a variable that contains a 'PSSession'.\r\n            This keyword is used by the Export-PSSession cmdlet to find the help topics for the exported commands.\r\n\r\n        .EXTERNALHELP c:\\external-Help.xml\r\n            Specifies an XML-based help file for the script or function.\r\n\r\n            The keyword is required when a function or script is documented in XML files.\r\n            Without this keyword, Get-Help cannot find the XML-based help file for the function or script.\r\n\r\n            The keyword takes precedence over other comment-based help keywords.\r\n            If present, Get-Help does not display comment-based help, even if it cannot find a help topic that matches the value of the keyword.\r\n\r\n            If the function is exported by a module, set the value of the  keyword to a file name without a path.\r\n            Get-Help looks for the specified file name in a language-specific subdirectory of the module directory.\r\n            There are no requirements for the name of the XML-based help file for a function, but a best practice is to use the following format: \u003cScriptModule.psm1>-help.xml.\r\n    #>\r\n\r\n    [CmdletBinding()]\r\n    [OutputType([int])]\r\n\r\n    param(\r\n        [Parameter(Mandatory=true)]\r\n        [string]\r\n        Param1\r\n    )\r\n    \r\n    begin {\r\n    }\r\n    \r\n    process {\r\n        \r\n    }\r\n    \r\n    end {\r\n        Return ${Return}\r\n    }\r\n}\r\n```","author":{"url":"https://github.com/RobertKlohr","@type":"Person","name":"RobertKlohr"},"datePublished":"2020-01-26T11:39:43Z","url":"https://github.com/PowerShell/EditorSyntax/issues/194"}

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:6b1a3ab3-975d-55e6-7b6b-506d61003a9e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAFCC:10AAEC:1F379:28FA5:6AFE0F2F
html-safe-noncee73319a047492ab2a3c794f6ba7641e6cc50d26efbcb6b8957f59369132510bc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkNDOjEwQUFFQzoxRjM3OToyOEZBNTo2QUZFMEYyRiIsInZpc2l0b3JfaWQiOiI4NTA4NTA2NTcwODIzMTc1OTgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd0c5cdcb53f0fb1292e9fe363dfd67e4166fbc332e4619277ce7ba99834eacd5
hovercard-subject-tagissue:555216215
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/EditorSyntax/194/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0ffdbfee89efeab7138f4a229c1a2ec1f112bf72cfa64f266dc650bcb51d46c3/PowerShell/EditorSyntax/issues/194
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0ffdbfee89efeab7138f4a229c1a2ec1f112bf72cfa64f266dc650bcb51d46c3/PowerShell/EditorSyntax/issues/194
og:image:altEnvironment Editor and Version (VS Code, Atom, Sublime): VS Code 1.41.1 OS: Windows 10 PowerShell: 5.1 Theme: Dark+ I tested the code snippet below with all extensions disabled using both the stabl...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameRobertKlohr
hostnamegithub.com
expected-hostnamegithub.com
None1fd4053be37b4bd545b4f38f1cecad058c343776acf2cbc6806316f26270e55e
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/EditorSyntax git https://github.com/PowerShell/EditorSyntax.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id59601299
octolytics-dimension-repository_nwoPowerShell/EditorSyntax
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id59601299
octolytics-dimension-repository_network_root_nwoPowerShell/EditorSyntax
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
release635a57b3d0df6bc21c0f39fc7078888fb90e4066
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/EditorSyntax/issues/194#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FEditorSyntax%2Fissues%2F194
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%2FEditorSyntax%2Fissues%2F194
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%2FEditorSyntax
Reloadhttps://github.com/PowerShell/EditorSyntax/issues/194
Reloadhttps://github.com/PowerShell/EditorSyntax/issues/194
Reloadhttps://github.com/PowerShell/EditorSyntax/issues/194
PowerShellhttps://github.com/PowerShell
EditorSyntaxhttps://github.com/PowerShell/EditorSyntax
Codehttps://github.com/PowerShell/EditorSyntax
Issues69 (69)https://github.com/PowerShell/EditorSyntax/issues
Pull requests5 (5)https://github.com/PowerShell/EditorSyntax/pulls
Actionshttps://github.com/PowerShell/EditorSyntax/actions
Projectshttps://github.com/PowerShell/EditorSyntax/projects
Wikihttps://github.com/PowerShell/EditorSyntax/wiki
Security and qualityhttps://github.com/PowerShell/EditorSyntax/security
Insightshttps://github.com/PowerShell/EditorSyntax/insights
https://github.com/PowerShell/EditorSyntax
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/EditorSyntax/issues/194
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/EditorSyntax/issues/194
Comment Based Help Keywords and Their Parameters Not Highlighting Correctlyhttps://github.com/PowerShell/EditorSyntax/issues/194#top
https://github.com/RobertKlohr
Robert Klohr (RobertKlohr)https://github.com/RobertKlohr
on Jan 26, 2020https://github.com/PowerShell/EditorSyntax/issues/194#issue-555216215
https://user-images.githubusercontent.com/39203582/73134335-432ad880-3fea-11ea-8625-c98dcd561746.png
https://user-images.githubusercontent.com/39203582/73134337-4b831380-3fea-11ea-9274-8f49eb6a0880.png
https://github.com/msftrncs
Carl Morris (msftrncs)https://github.com/msftrncs
on Jan 28, 2020https://github.com/PowerShell/EditorSyntax/issues/194#issuecomment-579095357
#136https://github.com/PowerShell/EditorSyntax/issues/136
#155https://github.com/PowerShell/EditorSyntax/pull/155
#156https://github.com/PowerShell/EditorSyntax/pull/156
https://github.com/RobertKlohr
Robert Klohr (RobertKlohr)https://github.com/RobertKlohr
on Jan 29, 2020https://github.com/PowerShell/EditorSyntax/issues/194#issuecomment-579536848
#136https://github.com/PowerShell/EditorSyntax/issues/136
#155https://github.com/PowerShell/EditorSyntax/pull/155
#156https://github.com/PowerShell/EditorSyntax/pull/156
#156https://github.com/PowerShell/EditorSyntax/pull/156
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/EditorSyntax/issues/194
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/EditorSyntax/issues/194
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.