diff --git a/CHANGELOG.md b/CHANGELOG.md index 310771e..3b9538f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## x.x.x - unreleased + +- Fix regression: allow extra spaces between record field and type signature + ([#118](https://github.com/JustusAdam/language-haskell/issues/118)) + ## 3.0.0 - 26.04.2020 - Integrated several contributions from [@robrix](https://github.com/robrix) diff --git a/syntaxes/haskell.YAML-tmLanguage b/syntaxes/haskell.YAML-tmLanguage index d3854cf..bae859c 100644 --- a/syntaxes/haskell.YAML-tmLanguage +++ b/syntaxes/haskell.YAML-tmLanguage @@ -509,7 +509,7 @@ repository: (?x) ([\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*) (?:\s*,\s*([\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*))* - \s(::|∷) + \s+(::|∷) end: ',|(?=})' beginCaptures: '1': {name: variable.other.definition.field.haskell} diff --git a/test/syntax-examples/test.hs b/test/syntax-examples/test.hs index 3408cc1..66854d1 100644 --- a/test/syntax-examples/test.hs +++ b/test/syntax-examples/test.hs @@ -221,15 +221,16 @@ then' = 0 data Data = Data { foo :: Int, bar :: Int } data Data = Data { - foo :: Int, bar :: Int + foo :: Int, bar :: Int -- comment } data Data = Data { - foo :: Int, - bar :: Int + foo :: Int, -- comment1 + bar :: Int -- comment2 } data Data = Data { - foo :: Int - , bar :: Int + foos :: Int -- comment1 + , bars :: Int -- comment2 + , baz :: Int -- comment3 } -- GADT's