SHL-158: Don't aggressively remove spaces

This commit is contained in:
Eric Bottard
2015-07-01 11:37:44 +02:00
committed by Eric Bottard
parent e693a7da9c
commit 3bbd89506e
2 changed files with 1 additions and 79 deletions

View File

@@ -114,7 +114,7 @@ public class SimpleParser implements Parser {
public ParseResult parse(final String rawInput) {
synchronized (mutex) {
Assert.notNull(rawInput, "Raw input required");
final String input = normalise(rawInput);
final String input = rawInput.trim();
resetCompletionInvocations();
@@ -415,16 +415,6 @@ public class SimpleParser implements Parser {
}
/**
* Normalises the given raw user input string ready for parsing
* @param rawInput the string to normalise; can't be <code>null</code>
* @return a non-<code>null</code> string
*/
String normalise(final String rawInput) {
// Replace all multiple spaces with a single space and then trim
return rawInput.replaceAll(" +", " ").trim();
}
private Set<String> getSpecifiedUnavailableOptions(final Set<CliOption> cliOptions,
final Map<String, String> options) {
Set<String> cliOptionKeySet = new LinkedHashSet<String>();