diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/nfeditor/languages/nfel.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/nfeditor/languages/nfel.js index 7644c777e8..a73003faf8 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/nfeditor/languages/nfel.js +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/nfeditor/languages/nfel.js @@ -14,6 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/* global nf, CodeMirror */ + nf.nfel = (function() { /** @@ -410,8 +413,8 @@ nf.nfel = (function() { // consume the entire token to better support suggest below stream.match(attributeOrSubjectlessFunctionExpression); - // if the result returned a match - if (subjectlessFunctionRegex.test(attributeOrSubjectlessFunctionName)) { + // if the result returned a match and is followed by a ( + if (subjectlessFunctionRegex.test(attributeOrSubjectlessFunctionName) && stream.peek() === '(') { // -------------------- // subjectless function // -------------------- @@ -550,8 +553,8 @@ nf.nfel = (function() { // against the latter. stream.match(/^[a-zA-Z]+/); - // see if this matches a known function - if (functionRegex.test(functionName)) { + // see if this matches a known function and is followed by ( + if (functionRegex.test(functionName) && stream.peek() === '(') { // -------- // function // --------