Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Can not add right braces '}' as content placeholder. #60

Closed

Description

@nshtg

They will break multiple things, like tabstops for example. Escaping them (\\}) does not solve the problem either.

Activity

  1. tregusti commented on Oct 1, 2014

    @tregusti

    +1

    This does not work.

    it('${1:does something}'${2:, function($3) {
        $4
    \}});
    
  2. joefitzgerald commented on Mar 10, 2015

    @joefitzgerald
    Contributor

    👍 The issue is in this code:

    wordRegexForSnippets: (snippets) ->
    prefixes = {}
    for prefix of snippets
    prefixes[character] = true for character in prefix
    prefixCharacters = Object.keys(prefixes).join('')
    new RegExp("[#{_.escapeRegExp(prefixCharacters)}]+")

    The regex eagerly searches for the next }, and does not factor in the need to count {'s to determine outer and inner scope. This may require something beyond regular expressions.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions