Fixed wrong line ending in generated CL code.
This commit is contained in:
parent
5fa7a743f5
commit
79f4685d9a
5 changed files with 6733 additions and 7318 deletions
|
@ -2,7 +2,8 @@
|
|||
|
||||
function opencl_minify(input)
|
||||
{
|
||||
let out = input.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, ''); // comments
|
||||
let out = input.replace(/\r/g, '');
|
||||
out = out.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, ''); // comments
|
||||
out = out.replace(/^#\s+/gm, '#'); // macros with spaces
|
||||
out = out.replace(/\n{2,}/g, '\n'); // empty lines
|
||||
out = out.replace(/^\s+/gm, ''); // leading whitespace
|
||||
|
@ -10,7 +11,7 @@ function opencl_minify(input)
|
|||
|
||||
let array = out.split('\n').map(line => {
|
||||
if (line[0] === '#') {
|
||||
return line
|
||||
return line;
|
||||
}
|
||||
|
||||
line = line.replace(/, /g, ',');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue