-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathace-builds-secret-tag.patch
32 lines (31 loc) · 1.2 KB
/
ace-builds-secret-tag.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Patch ace-builds to parse !secret yaml tag
---
diff --git a/source/assets/ace-builds/mode-yaml.js b/source/assets/ace-builds/mode-yaml.js
index 57ed248..262571b 100644
--- a/source/assets/ace-builds/mode-yaml.js
+++ b/source/assets/ace-builds/mode-yaml.js
@@ -31,6 +31,9 @@ var YamlHighlightRules = function () {
}, {
token: "keyword.operator",
regex: "-\\s*(?=[{])"
+ }, {
+ token: "keyword.operator",
+ regex: "!\\w*\\s*",
}, {
token: "string", // single line
regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
diff --git a/source/assets/ace-builds/worker-yaml.js b/source/assets/ace-builds/worker-yaml.js
index 5875513..2207826 100644
--- a/source/assets/ace-builds/worker-yaml.js
+++ b/source/assets/ace-builds/worker-yaml.js
@@ -4963,6 +4963,11 @@ module.exports = new Type('tag:yaml.org,2002:timestamp', {
represent: representYamlTimestamp
});
+module.exports = new Type('!secret', {
+ kind: 'scalar',
+ construct: function (data) { return data !== null ? data : ''; }
+});
+
},{"../type":16}],33:[function(require,module,exports){
(function (global){
var LARGE_ARRAY_SIZE = 200;