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/09 12:06:19 UTC
[skywalking-eyes] branch main updated: Add support for Smarty
template language (#38)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git
The following commit(s) were added to refs/heads/main by this push:
new fb12df0 Add support for Smarty template language (#38)
fb12df0 is described below
commit fb12df071f767a60e293a94b5b413e2fc7caf08c
Author: emschu <pr...@mailbox.org>
AuthorDate: Fri Jul 9 14:06:14 2021 +0200
Add support for Smarty template language (#38)
* add header comment configuration for Smarty template language
* add CurlyBracketAsterisk to header normalizing mechanism
---
assets/languages.yaml | 1 +
assets/styles.yaml | 5 +++++
pkg/license/norm.go | 2 ++
3 files changed, 8 insertions(+)
diff --git a/assets/languages.yaml b/assets/languages.yaml
index 315d9b3..4b0c75c 100644
--- a/assets/languages.yaml
+++ b/assets/languages.yaml
@@ -5383,6 +5383,7 @@ Smarty:
codemirror_mime_type: text/x-smarty
tm_scope: text.html.smarty
language_id: 353
+ comment_style_id: CurlyBracketAsterisk
Solidity:
type: programming
color: "#AA6746"
diff --git a/assets/styles.yaml b/assets/styles.yaml
index 3e6c28a..98fddc6 100644
--- a/assets/styles.yaml
+++ b/assets/styles.yaml
@@ -79,3 +79,8 @@
start: '%'
middle: '%'
end: '%'
+
+- id: CurlyBracketAsterisk
+ start: '{*'
+ middle: ~
+ end: '*}'
diff --git a/pkg/license/norm.go b/pkg/license/norm.go
index cf69b96..90ee00f 100644
--- a/pkg/license/norm.go
+++ b/pkg/license/norm.go
@@ -67,6 +67,8 @@ var (
regexp.MustCompile(`(?m)^\s*\.\.`), // ..
regexp.MustCompile(`(?mi)^\s*@?REM`), // @REM
regexp.MustCompile(`(?mi)^\s*%+`), // % e.g. matlab
+ regexp.MustCompile(`(?m)^\s*{\*+`), // {*
+ regexp.MustCompile(`(?m)^\s*\*+}`), // *}
}
flattenSpace = regexp.MustCompile(`\s+`)