Skip to content

Commit

Permalink
Merge pull request #973 from shuchenliu/master
Browse files Browse the repository at this point in the history
Add auto-complete support for Guillemets
  • Loading branch information
uranusjr authored May 3, 2018
2 parents bc1a9c1 + 9f9d8a6 commit 411442d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions MacDown/Code/Extension/NSTextView+Autocomplete.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
static const unichar kMPRightSingleQuotation = L'\u2019';
static const unichar kMPLeftDoubleQuotation = L'\u201c';
static const unichar kMPRightDoubleQuotation = L'\u201d';
static const unichar kMPLeftAngleSingleQuotation = L'\u2039';
static const unichar kMPRightAngleSingleQuotation = L'\u203a';
static const unichar kMPLeftAngleDoubleQuotation = L'\u00ab';
static const unichar kMPRightAngleDoubleQuotation = L'\u00bb';
static const unichar kMPLeftAngleSingleBracket = L'\u3008';
static const unichar kMPRightAngleSingleBracket = L'\u3009';
static const unichar kMPLeftAngleDoubleBracket = L'\u300a';
static const unichar kMPRightAngleDoubleBracket = L'\u300b';

static const unichar kMPMatchingCharactersMap[][2] = {
{L'(', L')'},
Expand All @@ -28,6 +36,10 @@
{L'\u300e', L'\u300f'}, // white corner brackets
{kMPLeftSingleQuotation, kMPRightSingleQuotation},
{kMPLeftDoubleQuotation, kMPRightDoubleQuotation},
{kMPLeftAngleSingleQuotation, kMPRightAngleSingleQuotation}, // Latin Single Guillemet
{kMPLeftAngleDoubleQuotation, kMPRightAngleDoubleQuotation}, // Latin Double Guillemet
{kMPLeftAngleSingleBracket, kMPRightAngleSingleBracket}, // East Asian Single Guillemet
{kMPLeftAngleDoubleBracket, kMPRightAngleDoubleBracket}, // East Asian Double Guillemet
{L'\0', L'\0'},
};

Expand Down

0 comments on commit 411442d

Please sign in to comment.