Skip to content

YA Regex that breaks syntax highlighting #75

Closed

Description

@lipkau

Description

I have the following line of code in my script:

[ValidatePattern('(?=^.{1,254}$)(^(?:(?!\d+\.)[a-zA-Z0-9_\-]{1,63}\.?)+(?:[a-zA-Z]{2,})$)')]

Here is how it looks in VSCode:

image

Environment

PS C:\> code -v
1.22.1
950b8b0d37a9b7061b6f0d291837ccc4015f5ecdx64

PS C:\> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      6      0      0

PS C:\> code --list-extensions --show-versions
[...]
ms-vscode.PowerShell@1.6.0
[...]

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.1
PSEdition                      Core
GitCommitId                    v6.0.1
OS                             Microsoft Windows 10.0.14393
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

  1. omniomi commented on May 3, 2018

    @omniomi
    Contributor

    I managed to find the issue. Need to do some more testing to make sure the fix doesn't introduce new problems and then I will submit the PR.

    regex-fix

  2. TylerLeonhardt commented on May 3, 2018

    @TylerLeonhardt
    Member

    Niceee 👍

  3. omniomi commented on May 21, 2018

    @omniomi
    Contributor

    Fixed by #94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions