mtien-apache commented on a change in pull request #5559:
URL: https://github.com/apache/nifi/pull/5559#discussion_r759771041
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
##########
@@ -996,6 +996,30 @@
}
},
+ /**
+ * Returns a tooltip for leading and/or trailing whitespace.
+ *
+ * @returns {string}
+ */
+ formatWhitespaceTooltip: function () {
+ return nfCommon.escapeHtml('The specified value contains leading
and/or trailing whitespace character(s). ' +
+ 'This could produce unexpected results if it was not
intentional.');
+
+ },
+
+ /**
+ * Checks the specified value for leading and/or trailing whitespace.
+ *
+ * @argument {string} value The value to check
+ */
+ hasWhitespace : function (value) {
+ if (!value) {
+ return false;
+ }
+ var leadOrTrailWhitespaceRegex = /^[ \s]+|[ \s]+$/;
Review comment:
Thanks for reviewing, @mcgilman! I misunderstood the criteria. I've
changed the condition to return `true` if the value has leading and/or trailing
whitespace and to return `false` if the value is _only_ whitespace.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]