Skip to content

Instantly share code, notes, and snippets.

WalterGR / bracket-matcher-look-at-previous-character-first-when-matching-closing-punctuation.patch
Last active Jan 22, 2016
Patch to Atom's bracket-matcher package (at revision 57b78b1) to look at the previous character first when matching closing punctuation
View bracket-matcher-look-at-previous-character-first-when-matching-closing-punctuation.patch
< {position, currentPair, matchingPair} = @findCurrentPair(startPairMatches)
> # Look for opening punctuation, checking the current character, then the previous character.
> {position, currentPair, matchingPair} = @findCurrentPair(startPairMatches, 0, -1)
< {position, currentPair, matchingPair} = @findCurrentPair(endPairMatches)
> # Look for closing punctuation, checking the previous character then the current character.
> {position, currentPair, matchingPair} = @findCurrentPair(endPairMatches, -1, 0)
You can’t perform that action at this time.