diff --git a/package-lock.json b/package-lock.json index 76235b3..8ff786b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "better-comments", - "version": "1.3.0", + "version": "2.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 902dfcc..a141db0 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "activationEvents": [ "onLanguage:ada", "onLanguage:al", - "onLanguage:asciidoc", + "onLanguage:asciidoc", "onLanguage:bibtex", "onLanguage:c", "onLanguage:clojure", @@ -32,8 +32,8 @@ "onLanguage:coffeescript", "onLanguage:cpp", "onLanguage:csharp", - "onLanguage:css", - "onLanguage:d", + "onLanguage:css", + "onLanguage:d", "onLanguage:dart", "onLanguage:diagram", "onLanguage:dockerfile", @@ -98,7 +98,8 @@ "onLanguage:vb", "onLanguage:verilog", "onLanguage:vue", - "onLanguage:yaml" + "onLanguage:yaml", + "onLanguage:elm" ], "galleryBanner": { "color": "#e3f4ff", diff --git a/src/parser.ts b/src/parser.ts index a473e56..8286cb8 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -330,6 +330,7 @@ export class Parser { this.delimiter = "--"; break; + case "elm": case "haskell": this.setCommentFormat("--", "{-", "-}"); break; diff --git a/src/test/samples/elm.elm b/src/test/samples/elm.elm new file mode 100644 index 0000000..446fcab --- /dev/null +++ b/src/test/samples/elm.elm @@ -0,0 +1,34 @@ +--!(no space) +-- ! (space) +-- ! tab then tab +-- ! tab then space +import Html exposing (..) + +--! user status +type UserStatus = Regular | Visitor + +{- +! type alias User +* type alias User +? type alias User +TODO typ alias Book +-} +type alias User = + { + firstName : String + , lastName : String + , age : Int + , status : UserStatus + } + +tom = {firstName = "tom", lastName = "john", age = 34, status = Visitor } + +main = + text "Hello world!" + +{- + TODO tab TODO + !double tab + ?triple tab + *quadruple tab +-} \ No newline at end of file