From 3263c86202ccae9ac7a81f753e872a5bb4b78f55 Mon Sep 17 00:00:00 2001 From: Ariel Lothlorien Date: Mon, 23 Nov 2015 07:57:26 -1000 Subject: [PATCH] Fixed #1 an issue with strings not being greedy enough. --- sprak.YAML-tmLanguage | 19 ++++------------ sprak.tmLanguage | 53 ++++++++----------------------------------- 2 files changed, 15 insertions(+), 57 deletions(-) diff --git a/sprak.YAML-tmLanguage b/sprak.YAML-tmLanguage index 1f60558..65b9bbc 100644 --- a/sprak.YAML-tmLanguage +++ b/sprak.YAML-tmLanguage @@ -60,19 +60,10 @@ patterns: - comment: String, double-quoted name: string.quoted.double.sprak - begin: (") - beginCaptures: - '1': { name: punctuation.definition.string.begin.sprak } - end: (") - endCaptures: - '1': { name: punctuation.definition.string.begin.sprak } - patterns: - - comment: Escaped double-quote inside double-quoted string - name: constant.character.escape.sprak - match: (\\") - - comment: Single quote inside double-quoted string - name: other.sprak - match: (') - - include: $self + match: \"[^"]*\" + +- comment: String, single-quoted + name: string.quoted.single.sprak + match: \'[^']*\' ... \ No newline at end of file diff --git a/sprak.tmLanguage b/sprak.tmLanguage index 97d75b0..1cbd556 100644 --- a/sprak.tmLanguage +++ b/sprak.tmLanguage @@ -132,53 +132,20 @@ - begin - (") - beginCaptures - - 1 - - name - punctuation.definition.string.begin.sprak - - comment String, double-quoted - end - (") - endCaptures - - 1 - - name - punctuation.definition.string.begin.sprak - - + match + \"[^"]*\" name string.quoted.double.sprak - patterns - - - comment - Escaped double-quote inside double-quoted string - match - (\\") - name - constant.character.escape.sprak - - - comment - Single quote inside double-quoted string - match - (') - name - other.sprak - - - include - $self - - + + + comment + String, single-quoted + match + \'[^']*\' + name + string.quoted.single.sprak scopeName