You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by ke...@apache.org on 2021/07/08 09:08:53 UTC
[skywalking-eyes] branch lang/matlab created (now a960d9d)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a change to branch lang/matlab
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git.
at a960d9d Add support for MatLab files
This branch includes the following new commits:
new a960d9d Add support for MatLab files
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[skywalking-eyes] 01/01: Add support for MatLab files
Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch lang/matlab
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git
commit a960d9d5164124027c074b1babe44299186d765d
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Jul 8 17:08:43 2021 +0800
Add support for MatLab files
---
assets/languages.yaml | 1 +
assets/styles.yaml | 5 +++++
pkg/license/norm.go | 1 +
3 files changed, 7 insertions(+)
diff --git a/assets/languages.yaml b/assets/languages.yaml
index 89e84d0..315d9b3 100644
--- a/assets/languages.yaml
+++ b/assets/languages.yaml
@@ -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"
diff --git a/assets/styles.yaml b/assets/styles.yaml
index 2115dfa..3e6c28a 100644
--- a/assets/styles.yaml
+++ b/assets/styles.yaml
@@ -74,3 +74,8 @@
start: 'rem'
middle: 'rem'
end: 'rem'
+
+- id: Percent
+ start: '%'
+ middle: '%'
+ end: '%'
diff --git a/pkg/license/norm.go b/pkg/license/norm.go
index 1b1bd74..cf69b96 100644
--- a/pkg/license/norm.go
+++ b/pkg/license/norm.go
@@ -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+`)