Fastst way to fix empty key value splitting for styled strings.

Signed-off-by: Sven Marquardt <dev@mail.smarquardt.space>

Signed-off-by: Sven Marquardt <dev@mail.smarquardt.space>
This commit is contained in:
Sven Marquardt 2022-10-12 12:55:29 +02:00 committed by GitHub
parent 87223d334e
commit 9db742618b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ public class StyledString {
public static class Span implements Comparable<Span> {
private static final MapSplitter ATTRIBUTES_SPLITTER =
Splitter.on(';').withKeyValueSeparator(Splitter.on('=').limit(2));
Splitter.on(';').omitEmptyStrings().withKeyValueSeparator(Splitter.on('=').limit(2));
private final String tag;
private final int firstChar;