Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

foreach not scoped correctly after curly brace

Abierto
#199 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
powershell
Área
tooling

Línea de trabajo

The issue names no repository file or test. Start by reproducing the PowerShell sample and inspecting the syntax scope assigned to where{...}.foreach{...}; compare it with the parenthesized form and the where method. Done means foreach receives a specific, consistent scope after a curly brace without regressing the existing highlighting.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

From @scriptingstudio in https://github.com/microsoft/vscode/issues/97404

Environment
  • Editor and Version (VS Code, Atom, Sublime):
    VS Code
    Version: 1.46.0-insider (user setup) also happens on 1.45
    Commit: 288852d8c26d797974bfb8aed06e1bff9b809223
    Date: 2020-05-12T05:43:31.363Z
    Electron: 7.2.4
    Chrome: 78.0.3904.130
    Node.js: 12.8.1
    V8: 7.8.279.23-electron.0
    OS: Windows_NT x64 10.0.19041
  • Your primary theme: N/A
Issue Description

Powershell methods foreach and where are not highlighted after curly bracket. With parenthesis it works fine.

Example code:

@($group).where{$_.count -gt 1 -and $_.name}.foreach{...}

"where" is highlighted.
"foreach" is not highlighted and has a very general scope

Screenshots

image

Expected Behavior

The foreach should have a more specific scope.

Code Samples
@($group).where{$_.count -gt 1 -and $_.name}.foreach{...}
Lenguaje dominante
PowerShell
Estrellas
151
Forks
55
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PowerShell/EditorSyntax

Todos los issues de PowerShell/EditorSyntax

Issues similares

Más issues de DevTools

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.