From 0d9ceb02a6bbe7460f97b43a3448a125852e2d30 Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Sat, 17 Mar 2018 23:19:45 +0100 Subject: [PATCH] Solidity extractor: fix usages of 'function' in comment flagging declarations --- src/helpers/solidity-extractor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/solidity-extractor.js b/src/helpers/solidity-extractor.js index 93ef23655..0858c189a 100644 --- a/src/helpers/solidity-extractor.js +++ b/src/helpers/solidity-extractor.js @@ -56,7 +56,7 @@ module.exports = async (sourceCodePath) => { const sourceCode = await readFile(sourceCodePath, 'utf8') // everything between every 'function' and '{' and its @notice - const funcDecs = sourceCode.match(/(@notice|function)(?:[^]*?){/gm) + const funcDecs = sourceCode.match(/(@notice|^\s*function)(?:[^]*?){/gm) if (!funcDecs) return []