Skip to content

Commit

Permalink
Fixed wrong line ending in generated CL code.
Browse files Browse the repository at this point in the history
  • Loading branch information
xmrig committed Nov 14, 2019
1 parent 5fa7a74 commit 79f4685
Show file tree
Hide file tree
Showing 5 changed files with 6,733 additions and 7,318 deletions.
5 changes: 3 additions & 2 deletions scripts/js/opencl_minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

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
out = out.replace(/ {2,}/g, ' '); // extra whitespace

let array = out.split('\n').map(line => {
if (line[0] === '#') {
return line
return line;
}

line = line.replace(/, /g, ',');
Expand Down
Loading

0 comments on commit 79f4685

Please sign in to comment.