diff --git a/Haskell/Haskell.sublime-syntax b/Haskell/Haskell.sublime-syntax index 632abf0c77..eb26434f86 100644 --- a/Haskell/Haskell.sublime-syntax +++ b/Haskell/Haskell.sublime-syntax @@ -1379,6 +1379,18 @@ contexts: 3: constant.character.escape.octal.haskell 4: constant.character.escape.hexadecimal.haskell 5: constant.character.escape.control.haskell + - match: (\\)\s*$ + captures: + 1: punctuation.separator.continuation.haskell + push: linteral-string-continuation + + linteral-string-continuation: + - meta_include_prototype: false + - match: \\ + scope: punctuation.separator.continuation.haskell + pop: 1 + - match: (?=") + pop: 1 ###[ KEYWORDS AND OPERATORS ]################################################## diff --git a/Haskell/tests/syntax_test_haskell.hs b/Haskell/tests/syntax_test_haskell.hs index 21aa4de4c6..d4831588af 100644 --- a/Haskell/tests/syntax_test_haskell.hs +++ b/Haskell/tests/syntax_test_haskell.hs @@ -3859,6 +3859,14 @@ main = do -- ^ punctuation.definition.string.end.haskell -- ^ keyword.operator.haskell + "This is a\ +-- ^^^^^^^^^^^^ meta.string.haskell string.quoted.double.haskell +-- ^ punctuation.separator.continuation.haskell + \multi-line string literal\ + \example" +-- ^^^^^^^^^ meta.string.haskell string.quoted.double.haskell +-- ^ punctuation.separator.continuation.haskell +-- ^ punctuation.definition.string.end.haskell -- [ INFIX OPERATORS ] --------------------------------------------------------