You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/special-chars.js
+2-2
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ codeInput.plugins.SpecialChars = class extends codeInput.Plugin {
18
18
* @param {RegExp} specialCharRegExp The regular expression which matches special characters
19
19
*/
20
20
constructor(colorInSpecialChars=false,inheritTextColor=false,specialCharRegExp=/(?!\n)(?!\t)[\u{0000}-\u{001F}]|[\u{007F}-\u{009F}]|[\u{0200}-\u{FFFF}]/ug){// By default, covers many non-renderable ASCII characters
21
-
super();
21
+
super([]);// No observed attributes
22
22
23
23
this.specialCharRegExp=specialCharRegExp;
24
24
this.colorInSpecialChars=colorInSpecialChars;
@@ -152,7 +152,7 @@ codeInput.plugins.SpecialChars = class extends codeInput.Plugin {
/* Runs before code is highlighted; Params: codeInput element) */
16
18
beforeHighlight(codeInput){
@@ -28,11 +30,8 @@ codeInput.plugins.Test = class extends codeInput.Plugin {
28
30
afterElementsAdded(codeInput){
29
31
console.log(codeInput,"after elements added");
30
32
}
31
-
/* Runs when an attribute of a `code-input` is changed (you must add the attribute name to observedAttributes); Params: codeInput element, name attribute name, oldValue previous value of attribute, newValue changed value of attribute) */
33
+
/* Runs when an observed attribute of a `code-input` is changed (you must add the attribute name in the constructor); Params: codeInput element, name attribute name, oldValue previous value of attribute, newValue changed value of attribute) */
0 commit comments