Skip to content

Commit

Permalink
More lenient first func check
Browse files Browse the repository at this point in the history
  • Loading branch information
tsherif committed Feb 19, 2020
1 parent 0714612 commit e663b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/shadertools/src/lib/assemble-shaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import injectShader, {DECLARATION_INJECT_MARKER} from './inject-shader';
import transpileShader from './transpile-shader';
import {assert} from '../utils';

const REGEX_FIRST_FUNCTION = /[ \t]*\w+[ \t]+\w+\s*\([^)]*\)\s*\{\n?/;
const REGEX_FIRST_FUNCTION = /^[ \t]*\w+[ \t]+\w+\s*\([^)]*\)/;
const INJECT_SHADER_DECLARATIONS = `\n\n${DECLARATION_INJECT_MARKER}\n\n`;

const SHADER_TYPE = {
Expand Down

0 comments on commit e663b6f

Please sign in to comment.