Remove all old shortcode converter references
Some checks failed
build-and-test / test (push) Successful in 1m17s
build-and-test / build (push) Successful in 1m47s
build-and-test / generate-javadoc (push) Failing after 1m45s

This commit is contained in:
JeremyStar™ 2024-11-05 21:16:42 +01:00
parent ea93d12151
commit 7cf9a4f418
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
4 changed files with 10 additions and 11 deletions

View file

@ -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

View file

@ -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);

View file

@ -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();

View file

@ -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())
) )
))); )));
} }