From 6e2da607dbb5ee25119569a8423c6f74b3563a92 Mon Sep 17 00:00:00 2001 From: Sri Harsha Chilakapati Date: Sun, 30 Aug 2020 11:58:23 +0530 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Michael Schmidt --- components/prism-purescript.js | 6 +++--- tests/languages/purescript/string_feature.test | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/prism-purescript.js b/components/prism-purescript.js index c270858678..494429547d 100644 --- a/components/prism-purescript.js +++ b/components/prism-purescript.js @@ -1,11 +1,11 @@ Prism.languages.purescript = Prism.languages.extend('haskell', { 'keyword': /\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/, - 'import_statement': { + 'import-statement': { // The imported or hidden names are not included in this import // statement. This is because we want to highlight those exactly like // we do for the names in the program. - pattern: /((?:\r?\n|\r|^)\s*)import\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][_a-zA-Z0-9']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m, + pattern: /(^\s*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m, lookbehind: true, inside: { 'keyword': /\b(?:import|as|hiding)\b/ @@ -13,7 +13,7 @@ Prism.languages.purescript = Prism.languages.extend('haskell', { }, // These are builtin functions only. Constructors are highlighted later as a constant. - 'builtin': /\b(?:when|unless|liftA1|apply|bind|discard|join|ifM|identity|whenM|unlessM|liftM1|ap|compose|otherwise|top|bottom|recip|eq|notEq|degree|div|mod|lcm|gcd|flip|const|map|void|flap|conj|disj|not|mempty|compare|min|max|comparing|clamp|between|sub|negate|append|add|zero|mul|one|show|unit|absurd)\b/, + 'builtin': /\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/, }); Prism.languages.purs = Prism.languages.purescript; diff --git a/tests/languages/purescript/string_feature.test b/tests/languages/purescript/string_feature.test index 49c2cfbf23..5439645b7c 100644 --- a/tests/languages/purescript/string_feature.test +++ b/tests/languages/purescript/string_feature.test @@ -2,7 +2,7 @@ "fo\"o" "foo \ \ bar" -"foo -- comment \ +"foo -- comment lookalike \ \ bar" ---------------------------------------------------- @@ -16,4 +16,4 @@ ---------------------------------------------------- -Checks for strings. \ No newline at end of file +Checks for strings.