Title: multiple issues detecting documentation keywords · Issue #136 · PowerShell/EditorSyntax · GitHub
Open Graph Title: multiple issues detecting documentation keywords · Issue #136 · PowerShell/EditorSyntax
X Title: multiple issues detecting documentation keywords · Issue #136 · PowerShell/EditorSyntax
Description: Environment Editor and Version: VS Code: 1.26.0 (with manual tweaks) Your primary theme: Dark+ Issue Description Presently, the documentation keyword detection/scoping/theming fails on the following items: # .keyword doesn't detect and s...
Open Graph Description: Environment Editor and Version: VS Code: 1.26.0 (with manual tweaks) Your primary theme: Dark+ Issue Description Presently, the documentation keyword detection/scoping/theming fails on the followin...
X Description: Environment Editor and Version: VS Code: 1.26.0 (with manual tweaks) Your primary theme: Dark+ Issue Description Presently, the documentation keyword detection/scoping/theming fails on the followin...
Opengraph URL: https://github.com/PowerShell/EditorSyntax/issues/136
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"multiple issues detecting documentation keywords","articleBody":"### Environment\r\n\r\n- Editor and Version: VS Code: 1.26.0 (with manual tweaks)\r\n- Your primary theme: Dark+\r\n\r\n### Issue Description\r\n\r\nPresently, the documentation keyword detection/scoping/theming fails on the following items:\r\n\r\n- `# .keyword` doesn't detect and scope\r\n- `\u003c# .keyword` doesn't detect and scope\r\n- once inside a comment block, extra `#` separated by spaces allows the keyword to detect, but Get-Help doesn't seem to permit this.\r\n- once inside a comment block, extra characters after a keyword that doesn't accept arguments allows the keyword to detect, but Get-Help doesn't seem to permit this. \r\n\r\n#### Screenshots\r\n\r\n\r\n(Showing modified sample from file attached to #134)\r\n\r\n### Expected Behavior\r\n\r\nExpected to match Get-Help's acceptance. However, that's much more difficult. Get-Help also accepts:\r\n\r\n- \u003cspaces>`\u003c#` \u003cspaces> `#>` \u003cspaces> `#` \u003cadditional `#`s> \u003cspaces>`.keyword`\r\n- does not accept `.keyword` if the containing comment doesn't otherwise start at the beginning of a line\r\n- and has limited acceptance of consecutively spaced and required placement, that probably only script analysis can accurately report on.\r\n\r\n### Possible Fix\r\n\r\nI think two changes could fix the easiest problems.\r\n\r\n1. Change the match for 'commentEmbeddedDocs' to\r\n(#\\1 match)\r\n```\r\n\"(?:^|\\G)(?i:\\s*(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))(?:\\s*$)\"\r\n```\r\n (#\\2 Match)\r\n```\r\n\"(?:^|\\G)(?i:\\s*(\\.)(PARAMETER|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP)\\s+([a-z0-9-_]+))\"\r\n```\r\n2. Change 'begin' match for 'commentLine' to\r\n```\r\n\"(?\u003c![`\\\\-])(#)#*\"\r\n```\r\nand change the capture from \"0\" to \"1\".\r\n\r\nWith the changes applied, this is the result:\r\n\r\n\r\n(not necessary valid, I know)\r\n\r\n```PowerShell\r\n# .synopsis\r\n\u003c# .synopsis\r\n.synopsis\r\n\u003c#\r\n# ## ## .DESCRIPTION blah blah\r\n This is a script function that will install HealOps on \"X\" system.\r\n#>\r\n```\r\n","author":{"url":"https://github.com/msftrncs","@type":"Person","name":"msftrncs"},"datePublished":"2018-08-16T18:19:41Z","url":"https://github.com/PowerShell/EditorSyntax/issues/136"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1fe0bdf9-b50d-bd17-9ece-dac8c7e031da |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D5E8:5C680:BFA12:103913:6AFE1406 |
| html-safe-nonce | cfc6f77616f7acb1c1a32246e02c91165842a78784f013e6898b643fd4b204fd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUU4OjVDNjgwOkJGQTEyOjEwMzkxMzo2QUZFMTQwNiIsInZpc2l0b3JfaWQiOiIxNTc2NjY1MDgwMDY0MjUwODg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0ee962e8ede57ec232d6668baa349d79dd69f7b5eb395e0abc4918555bb19703 |
| hovercard-subject-tag | issue:351315368 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/EditorSyntax/136/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a4a31f49ebd9f9f22f6a103888dc10927188886f473823c2035a60ec4e184a90/PowerShell/EditorSyntax/issues/136 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a4a31f49ebd9f9f22f6a103888dc10927188886f473823c2035a60ec4e184a90/PowerShell/EditorSyntax/issues/136 |
| og:image:alt | Environment Editor and Version: VS Code: 1.26.0 (with manual tweaks) Your primary theme: Dark+ Issue Description Presently, the documentation keyword detection/scoping/theming fails on the followin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msftrncs |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3cd8a1d79ccbf9aecac62781f79072482a49047fb982b8c9e2ad4aca8bf6a9af |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/EditorSyntax git https://github.com/PowerShell/EditorSyntax.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 59601299 |
| octolytics-dimension-repository_nwo | PowerShell/EditorSyntax |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 59601299 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/EditorSyntax |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 05539640a34afe6142a519483d78ddd766a1304a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width