Skip to content

Commit

Permalink
Add support for MatLab files (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
kezhenxu94 authored Jul 8, 2021
1 parent 95d8dc0 commit 9b209ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3120,6 +3120,7 @@ MATLAB:
codemirror_mode: octave
codemirror_mime_type: text/x-octave
language_id: 225
comment_style_id: Percent
MAXScript:
type: programming
color: "#00a6a6"
Expand Down
5 changes: 5 additions & 0 deletions assets/styles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@
start: 'rem'
middle: 'rem'
end: 'rem'

- id: Percent
start: '%'
middle: '%'
end: '%'
1 change: 1 addition & 0 deletions pkg/license/norm.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ var (
regexp.MustCompile(`(?m)^\s*::`), // ::
regexp.MustCompile(`(?m)^\s*\.\.`), // ..
regexp.MustCompile(`(?mi)^\s*@?REM`), // @REM
regexp.MustCompile(`(?mi)^\s*%+`), // % e.g. matlab
}

flattenSpace = regexp.MustCompile(`\s+`)
Expand Down

0 comments on commit 9b209ed

Please sign in to comment.