SHL-158: Don't aggressively remove spaces
This commit is contained in:
committed by
Eric Bottard
parent
e693a7da9c
commit
3bbd89506e
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user