keep delimitor space in array value

This commit is contained in:
bjiang
2016-04-01 14:08:41 -04:00
parent 996a970081
commit 52cd50e0a8

View File

@@ -163,7 +163,7 @@ public class RubyGemspecAnalyzer extends AbstractFileTypeAnalyzer {
String.format("\\s*?%s\\.%s\\s*?=\\s*?\\[(.*?)\\]", blockVariable, fieldPattern), Pattern.CASE_INSENSITIVE).matcher(contents);
if(arrayMatcher.find()) {
String arrayValue = arrayMatcher.group(1);
value = arrayValue.replaceAll("\\s*?['\"]", "").trim(); //strip quotes
value = arrayValue.replaceAll("['\"]", "").trim(); //strip quotes
}
//capture single value between quotes
else {