Skip to content

Refactoring (Wrap with...) remove escaping backslash in strings #4002

Closed

Description

@nicolasmol

Activity

  1. added this to the v3.44.0 milestone on Jun 1, 2022
  2. added
    in editorRelates to code editing or language features
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    on Jun 1, 2022
  3. DanTup commented on Jun 1, 2022

    @DanTup
    Member

    @nicolasmol are you able to share a complete code sample that triggers this? I don't seem to be able to repro with a simple case:

    Jun-01-2022 17-40-20

    Can you also confirm what version of VS Code, the Dart extension, and the Flutter SDK you're using? Thanks!

  4. added
    awaiting infoRequires more information from the customer to progress
    on Jun 1, 2022
  5. nicolasmol commented on Jun 1, 2022

    @nicolasmol
    Author

    Flutter 3.0.1 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision fb57da5f94 (il y a 13 jours) • 2022-05-19 15:50:29 -0700
    Engine • revision caaafc5604
    Tools • Dart 2.17.1 • DevTools 2.12.2

    environment:
      sdk: ">=2.2.2 <3.0.0"
    
    Text(
        "\$34",
        style: TextStyle(
          color: _purple,
          fontWeight: FontWeight.bold,
          fontSize: 17.0,
        ),
      )
  6. DanTup commented on Jun 1, 2022

    @DanTup
    Member

    Thanks! Turns out it only occurs with numbers after the $ and not text. I'll take a look.

  7. removed
    awaiting infoRequires more information from the customer to progress
    on Jun 1, 2022
  8. DanTup commented on Jun 1, 2022

    @DanTup
    Member

    This is related to us not detecting snippets reliably. We definitely need to find a proper way to do this:

    // HACK: This should be checking InsertTextFormat:
    // https://github.com/microsoft/language-server-protocol/issues/724#issuecomment-800334721
    const hasSnippet = /\$(\d+|\{\d+(?:[:|][^}]*)?\})/.test(textEdit.newText);

  9. DanTup commented on Jun 21, 2022

    @DanTup
    Member

    If you want to verify the fix before it ships, you can switch to the pre-release versions of the Dart+Flutter extension in VS Code shown here:

    Dart/Flutter pre-release versions

    The versions with the fix are v3.43.20220621 (and the stable version they'll ship in is v3.44).

    Please let me know if you hit any issues. Thanks!

  10. added a commit that references this issue on Sep 2, 2025
    94bd55d
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

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions