CTCV2/app/src/main/java/com/discord/utilities/textprocessing/Rules.java

30 lines
727 B
Java
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.discord.utilities.textprocessing;
import com.PatchConfig;
import java.util.regex.Pattern;
import lanchon.dexpatcher.annotation.DexAdd;
import lanchon.dexpatcher.annotation.DexEdit;
import lanchon.dexpatcher.annotation.DexIgnore;
@DexEdit
public final class Rules {
// pseudonitro-viewer patch
@DexEdit
private static Pattern PATTERN_CUSTOM_EMOJI = ctc_getCustomEmojiPattern();
@DexAdd
private static Pattern ctc_getCustomEmojiPattern() {
if (!PatchConfig.PSEUDONITRO_VIEWER_ENABLED) {
// Patch not enabled
return Pattern.compile("^<(a)?:([a-zA-Z_0-9]+):(\\d+)>");
}
return Pattern.compile("^<&??(a)?:([a-zA-Z_0-9]+):(\\d+)>");
}
}