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

Handle escaped characters in tab-stop placeholder content #123

Merged
merged 2 commits into from
Apr 6, 2015
Merged

Handle escaped characters in tab-stop placeholder content #123

merged 2 commits into from
Apr 6, 2015

Conversation

soren-n
Copy link
Contributor

@soren-n soren-n commented Mar 29, 2015

Aim to resolve #60.

To include } in your placeholder content selection, escape it with two \ :

it('${1:does something}' ${2:, function($3) {
    $4
\\}});

variableContent = content:(variable / variableContentText)* { return content; }
variableContentText = text:variableContentChar+ { return text.join(''); }
variableContentChar = !variable char:[^}] { return char; }
start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to have a more minimal diff here?

The current diff makes it looks like the entire peg was rewritten, yet things like simpleTabStop appear to be the same, just reformatted.

@soren-n
Copy link
Contributor Author

soren-n commented Mar 30, 2015

Rolled back and now only do the minimal changes

kevinsawicki added a commit that referenced this pull request Apr 6, 2015
Handle escaped characters in tab-stop placeholder content
@kevinsawicki kevinsawicki merged commit 5f78e1a into atom:master Apr 6, 2015
@kevinsawicki
Copy link
Contributor

Rolled back and now only do the minimal changes

Thanks so much for doing this, makes it super easy to review. Also thanks for this fixing this issue 🚢

@soren-n soren-n deleted the handleEscapeCharactersInTabStops branch April 7, 2015 13:51
thomasjo added a commit to thomasjo/language-latex that referenced this pull request Apr 13, 2015
Resolves the backslash issue caused by a breaking change that was
introduced in snippets in atom/snippets#123.

Fixes area#127
thomasjo added a commit to thomasjo/language-latex that referenced this pull request Apr 13, 2015
Resolves the backslash issue caused by a breaking change that was
introduced in snippets in atom/snippets#123.

Fixes area#30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not add right braces '}' as content placeholder.
2 participants