Skip to content

Commit

Permalink
Merge pull request #103 from kyranet/patch-1
Browse files Browse the repository at this point in the history
Added MJS support
  • Loading branch information
flosse committed May 24, 2018
2 parents a9d17d6 + 5765477 commit 2ae7e7f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/sloc.coffee
Expand Up @@ -31,10 +31,10 @@ getCommentExpressions = (lang) ->
/\#[^\{]/ # hashtag not followed by opening curly brace
when "cr", "py", "ls", "mochi", "nix", "r", "rb", "jl", "pl", "yaml", "hr"
/\#/
when "js", "jsx", "c", "cc", "cpp", "cs", "cxx", "h", "m", "mm", "hpp", \
"hx", "hxx", "ino", "java", "php", "php5", "go", "groovy", "scss", \
"less", "rs", "sass", "styl", "scala", "swift", "ts", "jade", "gs", \
"nut", "kt", "kts", "tsx", "fs", "fsi", "fsx", "bsl"
when "js", "jsx", "mjs", "c", "cc", "cpp", "cs", "cxx", "h", "m", "mm", \
"hpp", "hx", "hxx", "ino", "java", "php", "php5", "go", "groovy", \
"scss", "less", "rs", "sass", "styl", "scala", "swift", "ts", \
"jade", "gs", "nut", "kt", "kts", "tsx", "fs", "fsi", "fsx", "bsl"
/\/{2}/

when "latex", "tex", "sty", "cls"
Expand Down Expand Up @@ -73,10 +73,10 @@ getCommentExpressions = (lang) ->
when "coffee", "iced"
start = stop = /\#{3}/

when "js", "jsx", "c", "cc", "cpp", "cs", "cxx", "h", "m", "mm", "hpp", \
"hx", "hxx", "ino", "java", "ls", "nix", "php", "php5", "go", \
"css", "sass", "scss", "less", "rs", "styl", "scala", "ts", "gs", \
"groovy", "nut", "kt", "kts", "tsx", "sql"
when "js", "jsx", "mjs", "c", "cc", "cpp", "cs", "cxx", "h", "m", "mm", \
"hpp", "hx", "hxx", "ino", "java", "ls", "nix", "php", "php5", \
"go", "css", "sass", "scss", "less", "rs", "styl", "scala", "ts", \
"gs", "groovy", "nut", "kt", "kts", "tsx", "sql"
start = /\/\*+/
stop = /\*\/{1}/

Expand Down Expand Up @@ -287,6 +287,7 @@ extensions = [
"jl"
"js"
"jsx"
"mjs"
"kt"
"kts"
"latex"
Expand Down

0 comments on commit 2ae7e7f

Please sign in to comment.