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.

Backslash in snippet not inserted #127

Closed

Description

@jaenthemaen

I'm using a number of latex snippets that have stopped working with the latest update of the editor (running the latest OSX version). The backslash in these snippets is no longer inserted, meaning this:

'.text.latex':
    '\\emph{}':
        'prefix': 'em'
        'body': '\\emph{$1} $2'

leads to this:

emph{}

instead of:

\emph{}

It also doesn't seem to matter where the double backslash is placed in the snippet. It is ignored whenever another letter is following the double backslash.

Activity

  1. winstliu commented on Apr 13, 2015

    @winstliu
    Contributor

    Looks like this broke with #123. Perhaps try one or three backslashes?

  2. jaenthemaen commented on Apr 13, 2015

    @jaenthemaen
    Author

    Just did and neither of which is working for me, unfortunately.

  3. thomasjo commented on Apr 13, 2015

    @thomasjo

    I can confirm that this is broken. Unsure whether this can be reasonably fixed at the snippet level.

  4. thomasjo commented on Apr 13, 2015

    @thomasjo

    OK, so double-escaping seems to work. Using @jaenthemaen example, this works as expected

    '.text.tex.latex':
      '\\emph{}':
        'prefix': 'em'
        'body': '\\\\emph{$1} $2'

    NB: I changed the grammar scope since this is the scope that language-latex uses.

  5. izuzak commented on Apr 13, 2015

    @izuzak
    Contributor

    Using 4 backslashes does it for me. Try:

    '.text.latex':
        '\\emph{}':
            'prefix': 'em'
            'body': '\\\\emph{$1} $2'
    
  6. jaenthemaen commented on Apr 13, 2015

    @jaenthemaen
    Author

    Indeed, that does the trick! 👍 Thank you!

  7. added a commit that references this issue on Jul 10, 2016
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