30 lines
727 B
Java
30 lines
727 B
Java
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+)>");
|
||
}
|
||
|
||
}
|