Skip to content

Commit

Permalink
add support for more languages
Browse files Browse the repository at this point in the history
  • Loading branch information
while-loop committed Aug 23, 2018
1 parent c507768 commit c27cedb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/parser/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ const (
)

var (
// https://en.wikipedia.org/wiki/Comparison_of_programming_languages_(syntax)#Inline_comments
slashRegex = regexp.MustCompile(strings.Replace(cmtRegex, cmtToken, slash, 1))
hashRegex = regexp.MustCompile(strings.Replace(cmtRegex, cmtToken, hash, 1))
mentionsRegex = regexp.MustCompile(`(@[^\s]+)`)
labelsRegex = regexp.MustCompile(`\+([^\s]+)`)
slashLangs = []string{"go", "java", "c", "cpp", "h", "hpp", "test"}
hashLangs = []string{"py", "sh", "bash", "yml", "yaml"}
slashLangs = []string{"go", "java", "c", "cpp", "h", "hpp", "test", "as", "cs", "d", "fs", "js", "kt", "php", "swift", "m", "mm"}
hashLangs = []string{"py", "sh", "bash", "yml", "yaml", "ps", "ps1", "r", "rb", "Makefile", "Dockerfile", "pl"}
)

func init() {
Expand Down

0 comments on commit c27cedb

Please sign in to comment.