Skip to content

Commit 041a5b3

Browse files
committed
removed unused code from p5-javascript.js and added comment in automatically generated helper file
1 parent dc265ef commit 041a5b3

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

client/utils/p5-javascript-template.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/utils/p5-javascript.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
2929
function kw(type) {return {type: type, style: "keyword"};}
3030
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
3131
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
32-
var p5Function = {type: "variable", style: "p5-function"};
33-
var p5Variable = {type: "variable", style: "p5-variable"};
3432

3533
var jsKeywords = {
3634
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,

server/scripts/update-syntax-highlighting.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ request('https://p5js.org/reference/data.json', (err, res) => {
2828
p5FunctionPart = p5FunctionPart.replace(/"p5Function"/g, 'p5Function');
2929

3030
let generatedCode = '/*eslint-disable*/ \n';
31+
generatedCode += '/*helper file for syntax highlighting generated by update-syntax-highlighting script*/ \n';
3132
generatedCode += 'var p5Function = {type: "variable", style: "p5-function"};\n';
3233
generatedCode += 'var p5Variable = {type: "variable", style: "p5-variable"};\n';
3334
generatedCode += `let p5VariableKeywords = ${p5VariablePart}; \n`;

0 commit comments

Comments
 (0)