Commit b71aab58 authored by William Entriken's avatar William Entriken Committed by yann300

Better indentation

parent 8539ff26
...@@ -57,7 +57,7 @@ function compileFileOrFiles (filename, isDirectory, opts, cb) { ...@@ -57,7 +57,7 @@ function compileFileOrFiles (filename, isDirectory, opts, cb) {
if (foundpath.split('.').pop() === 'sol') { if (foundpath.split('.').pop() === 'sol') {
let c = fs.readFileSync(foundpath).toString() let c = fs.readFileSync(foundpath).toString()
const s = /^(import)\s['"](remix_tests.sol|tests.sol)['"];/gm const s = /^(import)\s['"](remix_tests.sol|tests.sol)['"];/gm
if (foundpath.indexOf('_test.sol') > 0 && c.regexIndexOf(s) < 0) { if (foundpath.indexOf('_test.sol') > 0 && c.regexIndexOf(s) < 0) {
c = c.replace(/(pragma solidity \^?\d+\.\d+\.\d+;)/, '$1\nimport \'remix_tests.sol\';') c = c.replace(/(pragma solidity \^?\d+\.\d+\.\d+;)/, '$1\nimport \'remix_tests.sol\';')
} }
sources[foundpath] = { content: c } sources[foundpath] = { content: c }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment