Skip to content

Commit 0438953

Browse files
authored
Merge pull request #40 from Landoop/ignore-comments
Comments in property file are now ignored Fixes #38
2 parents ff24e26 + cf0da62 commit 0438953

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/kafka-connect/create-connector/create-connector.controller.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ angularAPP.controller('CreateConnectorCtrl', function ($scope, $rootScope, $http
5151
$scope.$watch('formValuesPerSection', function() {
5252
if ($scope.formValuesPerSection) {
5353
$scope.formValuesPerSection = $scope.formValuesPerSection.replace("\r", "");
54-
var flatValuesArray = $scope.formValuesPerSection.split("\n");
54+
var flatValuesArray = $scope.formValuesPerSection.split("\n").filter(function (config) {
55+
return (config.charAt(0) !== "#");
56+
});
5557
validateConnectorFn();
5658
}
5759
});
@@ -66,7 +68,9 @@ angularAPP.controller('CreateConnectorCtrl', function ($scope, $rootScope, $http
6668
var errorConfigs = [];
6769
var warningConfigs = [];
6870

69-
flatValuesArray = $scope.formValuesPerSection.split('\n');
71+
flatValuesArray = $scope.formValuesPerSection.split("\n").filter(function (config) {
72+
return (config.charAt(0) !== "#");
73+
});
7074
config = NewConnectorFactory.getJSONConfigFlat(flatValuesArray);
7175

7276
// Make sure the 'classname' is a valid one - as it can crash the connect services

0 commit comments

Comments
 (0)