Remove all old shortcode converter references
This commit is contained in:
parent
ea93d12151
commit
7cf9a4f418
4 changed files with 10 additions and 11 deletions
|
@ -29,7 +29,7 @@ import java.util.LinkedList;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for implementing a shortcode converter.
|
* Base class for implementing a shortcode parser.
|
||||||
* <p>
|
* <p>
|
||||||
* This class parses a string and converts it into a list of
|
* This class parses a string and converts it into a list of
|
||||||
* components, which can then be in turn be converted to something
|
* components, which can then be in turn be converted to something
|
||||||
|
|
|
@ -23,9 +23,8 @@ import de.staropensource.engine.base.EngineConfiguration;
|
||||||
import de.staropensource.engine.base.implementable.LoggingAdapter;
|
import de.staropensource.engine.base.implementable.LoggingAdapter;
|
||||||
import de.staropensource.engine.base.logging.Logger;
|
import de.staropensource.engine.base.logging.Logger;
|
||||||
import de.staropensource.engine.base.type.logging.LogLevel;
|
import de.staropensource.engine.base.type.logging.LogLevel;
|
||||||
import de.staropensource.engine.base.implementation.shortcode.EmptyShortcodeConverter;
|
import de.staropensource.engine.base.implementation.shortcode.EmptyShortcodeParser;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints log messages to the console, without any fancy colors or formatting.
|
* Prints log messages to the console, without any fancy colors or formatting.
|
||||||
|
@ -45,7 +44,7 @@ public class PlainLoggingAdapter implements LoggingAdapter {
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public void print(@NotNull LogLevel level, @NotNull StackTraceElement issuer, @NotNull String message, @NotNull String format) {
|
public void print(@NotNull LogLevel level, @NotNull StackTraceElement issuer, @NotNull String message, @NotNull String format) {
|
||||||
format = new EmptyShortcodeConverter(format, true).getClean();
|
format = new EmptyShortcodeParser(format, true).getClean();
|
||||||
if (level == LogLevel.ERROR || level == LogLevel.CRASH)
|
if (level == LogLevel.ERROR || level == LogLevel.CRASH)
|
||||||
if (EngineConfiguration.getInstance() != null && EngineConfiguration.getInstance().isLogForceStandardOutput())
|
if (EngineConfiguration.getInstance() != null && EngineConfiguration.getInstance().isLogForceStandardOutput())
|
||||||
System.out.println(format);
|
System.out.println(format);
|
||||||
|
|
|
@ -27,18 +27,18 @@ import org.jetbrains.annotations.NotNull;
|
||||||
* Cleans the string of any tags.
|
* Cleans the string of any tags.
|
||||||
*
|
*
|
||||||
* @see ShortcodeParser
|
* @see ShortcodeParser
|
||||||
* @since v1-alpha1
|
* @since v1-alpha8
|
||||||
*/
|
*/
|
||||||
public final class EmptyShortcodeConverter extends ShortcodeParser {
|
public final class EmptyShortcodeParser extends ShortcodeParser {
|
||||||
/**
|
/**
|
||||||
* Creates and initializes an instance of this class.
|
* Creates and initializes an instance of this class.
|
||||||
*
|
*
|
||||||
* @param string string to parse
|
* @param string string to parse
|
||||||
* @param ignoreInvalidEscapes if {@code true}, will ignore and treat invalid escapes as text
|
* @param ignoreInvalidEscapes if {@code true}, will ignore and treat invalid escapes as text
|
||||||
* @throws ParserException on error
|
* @throws ParserException on error
|
||||||
* @since v1-alpha1
|
* @since v1-alpha8
|
||||||
*/
|
*/
|
||||||
public EmptyShortcodeConverter(@NotNull String string, boolean ignoreInvalidEscapes) throws ParserException {
|
public EmptyShortcodeParser(@NotNull String string, boolean ignoreInvalidEscapes) throws ParserException {
|
||||||
super(string, ignoreInvalidEscapes);
|
super(string, ignoreInvalidEscapes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public final class EmptyShortcodeConverter extends ShortcodeParser {
|
||||||
* Returns the parsed string without any tags.
|
* Returns the parsed string without any tags.
|
||||||
*
|
*
|
||||||
* @return cleaned input string
|
* @return cleaned input string
|
||||||
* @since v1-alpha1
|
* @since v1-alpha8
|
||||||
*/
|
*/
|
||||||
public @NotNull String getClean() {
|
public @NotNull String getClean() {
|
||||||
StringBuilder output = new StringBuilder();
|
StringBuilder output = new StringBuilder();
|
|
@ -20,7 +20,7 @@
|
||||||
package de.staropensource.engine.base.logging.backend;
|
package de.staropensource.engine.base.logging.backend;
|
||||||
|
|
||||||
import de.staropensource.engine.base.EngineConfiguration;
|
import de.staropensource.engine.base.EngineConfiguration;
|
||||||
import de.staropensource.engine.base.implementation.shortcode.EmptyShortcodeConverter;
|
import de.staropensource.engine.base.implementation.shortcode.EmptyShortcodeParser;
|
||||||
import de.staropensource.engine.base.logging.Logger;
|
import de.staropensource.engine.base.logging.Logger;
|
||||||
import de.staropensource.engine.base.logging.backend.async.LoggingQueue;
|
import de.staropensource.engine.base.logging.backend.async.LoggingQueue;
|
||||||
import de.staropensource.engine.base.type.logging.LogLevel;
|
import de.staropensource.engine.base.type.logging.LogLevel;
|
||||||
|
@ -349,7 +349,7 @@ public final class Processor {
|
||||||
builder.append(sanitizeFormat(handlePlaceholders(
|
builder.append(sanitizeFormat(handlePlaceholders(
|
||||||
message.replace(
|
message.replace(
|
||||||
"\n",
|
"\n",
|
||||||
"\n" + " ".repeat(new EmptyShortcodeConverter(builder.toString(), true).getClean().length())
|
"\n" + " ".repeat(new EmptyShortcodeParser(builder.toString(), true).getClean().length())
|
||||||
)
|
)
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue