Skip to content

Commit

Permalink
Update OSL Utils.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Mistium authored Dec 11, 2024
1 parent 18c5c7d commit 05ff6b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Resources/OSL Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function compileCloseBrackets(OSL) {
let inputs = autoTokenise(trimmed, ",");
name = randomString(12);
const cur = inputs[0].trim();
if (/^\w+$/.test(cur)) {
if (/^[\w\-]+$/.test(cur)) {
methods[temp] = cur;
} else {
out.push(`${name} = ${cur}`);
Expand All @@ -197,7 +197,7 @@ function compileCloseBrackets(OSL) {
for (let i = 1; i < inputs.length; i++) {
name = randomString(12);
const cur = inputs[i].trim();
if (/^\w+$/.test(cur)) {
if (/^[\w\-]+$/.test(cur)) {
methods[temp] += `,${cur}`;
} else {
methods[temp] += `,${name}`;
Expand Down

0 comments on commit 05ff6b5

Please sign in to comment.