#Requires syntax highlighting bug
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- powershell
- Bereich
- tooling
Rechercherichtung
Reproduce the issue in a .ps1 file with #Requires Microsoft365DSC, then inspect the EditorSyntax grammar entry that handles #Requires and module names. Done means the full module name remains syntax-highlighted rather than treating characters after 365 as a comment.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
Summary
There is the #Requires syntax highlighting bug. If there is some module with letters and numbers in module name, add-in highlights part with first block of letters and numbers and the rest chars highlight as a comment.
You can reproduce the issue if add the code below to ps1 file
#Requires Microsoft365DSC
Will be highlighted only the part of the module name. All characters follow after 365 will be highlighted as comment.
The funny thing, is that the module name highlighted in the same manner on github as well 😁
PowerShell Version
Name Value
---- -----
PSVersion 7.1.3
PSEdition Core
GitCommitId 7.1.3
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visual Studio Code Version
1.63.2
899d46d82c4c95423fb7e10e68eba52050e30ba3
x64
Extension Version
ms-vscode.powershell@2021.12.0
Steps to Reproduce
You can reproduce the issue if add the code below to ps1 file
#Requires Microsoft365DSC
Visuals
No response
Logs
No response
- Vorherrschende Sprache
- PowerShell
- Sterne
- 151
- Forks
- 55
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PowerShell/EditorSyntax
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
PowerShell/EditorSyntax#224 · 2 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
PowerShell/EditorSyntax#222 · 2 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
PowerShell/EditorSyntax#221 · 2 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
PowerShell/EditorSyntax#220 · 2 Kommentare · 1 Reaktion ·
-
Issue-Bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
PowerShell/EditorSyntax#219 · 2 Kommentare ·
Alle Issues in PowerShell/EditorSyntax
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
idean3885/claude-ops-agent#521 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
0xMiden/bridge-portal#132 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
newrelic-experimental/preflight#793 · 1 Kommentar ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
babalae/bettergi-scripts-list#3674 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
caddyserver/caddy#8046 ·