From 519bdb7ad62ca760da21c0f865baa9661f228f48 Mon Sep 17 00:00:00 2001 From: iminlikewithyou Date: Sun, 28 Jul 2024 15:29:56 -0500 Subject: [PATCH 1/9] add all of the new themes --- src/highlighting/CharacterSet.ts | 108 ++++++++++++++ src/highlighting/highlighters/Caffeinated.ts | 145 +++++++++++++++++++ src/highlighting/highlighters/ComicSans.ts | 145 +++++++++++++++++++ src/highlighting/highlighters/Dark.ts | 145 +++++++++++++++++++ src/highlighting/highlighters/Default.ts | 145 +++++++++++++++++++ src/highlighting/highlighters/Green.ts | 145 +++++++++++++++++++ src/highlighting/highlighters/Lifeboat.ts | 145 +++++++++++++++++++ src/highlighting/highlighters/Lilac.ts | 145 +++++++++++++++++++ src/highlighting/highlighters/Rose.ts | 145 +++++++++++++++++++ src/highlighting/highlighters/Text.ts | 66 +++++++++ src/highlighting/highlighters/Vivi.ts | 145 +++++++++++++++++++ 11 files changed, 1479 insertions(+) create mode 100644 src/highlighting/CharacterSet.ts create mode 100644 src/highlighting/highlighters/Caffeinated.ts create mode 100644 src/highlighting/highlighters/ComicSans.ts create mode 100644 src/highlighting/highlighters/Dark.ts create mode 100644 src/highlighting/highlighters/Default.ts create mode 100644 src/highlighting/highlighters/Green.ts create mode 100644 src/highlighting/highlighters/Lifeboat.ts create mode 100644 src/highlighting/highlighters/Lilac.ts create mode 100644 src/highlighting/highlighters/Rose.ts create mode 100644 src/highlighting/highlighters/Text.ts create mode 100644 src/highlighting/highlighters/Vivi.ts diff --git a/src/highlighting/CharacterSet.ts b/src/highlighting/CharacterSet.ts new file mode 100644 index 0000000..c666d0d --- /dev/null +++ b/src/highlighting/CharacterSet.ts @@ -0,0 +1,108 @@ +import { Client } from "discord.js"; + +// letters numbers, at, hyphen, space, apostrophe +export interface CharacterMap { + " ": string; + "A": string; + "B": string; + "C": string; + "D": string; + "E": string; + "F": string; + "G": string; + "H": string; + "I": string; + "J": string; + "K": string; + "L": string; + "M": string; + "N": string; + "O": string; + "P": string; + "Q": string; + "R": string; + "S": string; + "T": string; + "U": string; + "V": string; + "W": string; + "X": string; + "Y": string; + "Z": string; + "0": string; + "1": string; + "2": string; + "3": string; + "4": string; + "5": string; + "6": string; + "7": string; + "8": string; + "9": string; + "@": string; + "-": string; + "'": string; + + "unknown": string; +} + +export interface PresentCharacterMap extends CharacterMap { + "any": string; +} + +export interface CharacterTheme { + Present: PresentCharacterMap; + Highlighted: CharacterMap; + Wildcard: CharacterMap; +} + +const emojiRegex = /(?/g; + +/** + * Gets the set of unusable emojis in a message. + * + * @param client The client to use to check for emojis + * @param message The message to check for unusable emojis + * @returns A set of unusable emoji IDs + */ +function getUnusableEmojis(client: Client, message: string): Set { + return [...message.matchAll(emojiRegex)].reduce((accumulator, match) => { + const emojiId = match[1]; + const emoji = client.emojis.cache.get(emojiId); + if (!emoji) accumulator.add(emojiId); + return accumulator; + }, new Set()); +} + +/** + * Checks if a message contains only sendable emojis. + * + * @param client The client to use to check for emojis + * @param message The message to check for unusable emojis + * @returns `true` if the message contains only sendable emojis + */ +function areEmojisInMessageSendable(client: Client, message: string): boolean { + let match: RegExpExecArray | null; + while (match = emojiRegex.exec(message)) { + const emojiId = match[1]; + const emoji = client.emojis.cache.get(emojiId); + if (!emoji) return false; + } + return true; +} + +/** + * Replaces unusable emojis in a message with a replacement string. + * + * @param client The client to use to check for emojis + * @param message The message to replace unusable emojis in + * @param replacement The replacement string + * @returns The message with unusable emojis replaced + */ +function replaceUnusableEmojis(client: Client, message: string, replacement: string) { + return message.replace(emojiRegex, (match, emojiId) => { + const emoji = client.emojis.cache.get(emojiId); + if (!emoji) return replacement; + return match; + }); +} \ No newline at end of file diff --git a/src/highlighting/highlighters/Caffeinated.ts b/src/highlighting/highlighters/Caffeinated.ts new file mode 100644 index 0000000..39b04d9 --- /dev/null +++ b/src/highlighting/highlighters/Caffeinated.ts @@ -0,0 +1,145 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +export const PresentCharacters: PresentCharacterMap = { + "A": "<:A:1202784518847733800>", + "B": "<:B:1202785058499465328>", + "C": "<:C:1202785059422085140>", + "D": "<:D:1202785060563189770>", + "E": "<:E:1202785061435473991>", + "F": "<:F:1202785063071252502>", + "G": "<:G:1202785064359034900>", + "H": "<:H:1202784522324811846>", + "I": "<:I:1202785145401249882>", + "J": "<:J:1202785147771158608>", + "K": "<:K:1202785148911747082>", + "L": "<:L:1202785149981294594>", + "M": "<:M:1202784526007275540>", + "N": "<:N:1202785152095363122>", + "O": "<:O:1202785153072627732>", + "P": "<:P:1202784529941790791>", + "Q": "<:Q:1202785154154627172>", + "R": "<:R:1202785155996057600>", + "S": "<:S:1202785156943970324>", + "T": "<:T:1202785241438097408>", + "U": "<:U:1202784532701384804>", + "V": "<:V:1202785243149635624>", + "W": "<:W:1202785243967524874>", + "X": "<:X:1202785245099982948>", + "Y": "<:Y:1202785246030991400>", + "Z": "<:Z:1202785247436218439>", + "0": "<:0:1202784536572854383>", + "1": "<:1:1202784509603487794>", + "2": "<:2:1202784511210037299>", + "3": "<:3:1202784511994241054>", + "4": "<:4:1202784513013587979>", + "5": "<:5:1202784514816999424>", + "6": "<:6:1202784515672768512>", + "7": "<:7:1202784516532338708>", + "8": "<:8:1202785056020631552>", + "9": "<:9:1202785057144573952>", + "'": "<:Apostrophe:1202785248455163934>", + "@": "<:At:1202785249432436826>", + "-": "<:Hyphen:1202784539689226311>", + + " ": "<:Empty:738324857296650293>", + "any": "<:Blank:1202784508055912479>", + "unknown": "<:Hyphen:1202784539689226311>" // TODO +}; + +export const HighlightedCharacters: CharacterMap = { + "A": "<:A:1202785449907724349>", + "B": "<:B:1202785451228799046>", + "C": "<:C:1202785452487221269>", + "D": "<:D:1202785454026530888>", + "E": "<:E:1202785455402254336>", + "F": "<:F:1202785456534847568>", + "G": "<:G:1202785457511866368>", + "H": "<:H:1202785459386982530>", + "I": "<:I:1202785519012945990>", + "J": "<:J:1202785761972326470>", + "K": "<:K:1202785763725541387>", + "L": "<:L:1202785764740571166>", + "M": "<:M:1202785765612847164>", + "N": "<:N:1202785766661689394>", + "O": "<:O:1202785768020385883>", + "P": "<:P:1202785768863567882>", + "Q": "<:Q:1202785770167992430>", + "R": "<:R:1202785887520563210>", + "S": "<:S:1202785888464273458>", + "T": "<:T:1202785889877622804>", + "U": "<:U:1202785890729201704>", + "V": "<:V:1202785891614068827>", + "W": "<:W:1202785893468082197>", + "X": "<:X:1202785894302617651>", + "Y": "<:Y:1202785895393271838>", + "Z": "<:Z:1202785943845601330>", + "0": "<:0:1202785944701509662>", + "1": "<:1:1202785946303467570>", + "2": "<:2:1202785947343917116>", + "3": "<:3:1202785948375457882>", + "4": "<:4:1202785950585851904>", + "5": "<:5:1202785951814909962>", + "6": "<:6:1202785952645255198>", + "7": "<:7:1202785982433333338>", + "8": "<:8:1202785984899584070>", + "9": "<:9:1202785986137034782>", + "'": "<:Apostrophe:1202785987260973067>", + "@": "<:At:1202785988863205396>", + "-": "<:Hyphen:1202785989786083378>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202785989786083378>" // TODO +} + +export const WildcardCharacters: CharacterMap = { + "A": "<:A:1202786054810243112>", + "B": "<:B:1202786056487833700>", + "C": "<:C:1202786057624489984>", + "D": "<:D:1202786058509623346>", + "E": "<:E:1202786060178948187>", + "F": "<:F:1202786061521133568>", + "G": "<:G:1202786062292877344>", + "H": "<:H:1202786104881848360>", + "I": "<:I:1202786105452273715>", + "J": "<:J:1202786107494760458>", + "K": "<:K:1202786108342140949>", + "L": "<:L:1202786109164355686>", + "M": "<:M:1202786110514929784>", + "N": "<:N:1202786111374753792>", + "O": "<:O:1202786113027055657>", + "P": "<:P:1202786185861267507>", + "Q": "<:Q:1202786186817568808>", + "R": "<:R:1202786188059213914>", + "S": "<:S:1202786188625444895>", + "T": "<:T:1202786311979798538>", + "U": "<:U:1202786312827047977>", + "V": "<:V:1202786314324545567>", + "W": "<:W:1202786315310075924>", + "X": "<:X:1202786316379627560>", + "Y": "<:Y:1202786318053015642>", + "Z": "<:Z:1202786318955053127>", + "0": "<:0:1202786319974137957>", + "1": "<:1:1202786362953306112>", + "2": "<:2:1202786363850756146>", + "3": "<:3:1202786365180485633>", + "4": "<:4:1202786366921117777>", + "5": "<:5:1202786367994855434>", + "6": "<:6:1202786369609404516>", + "7": "<:7:1202786429168648284>", + "8": "<:8:1202786430116560936>", + "9": "<:9:1202786431559270411>", + "'": "<:Apostrophe:1202786433224548402>", + "@": "<:At:1202786435053256724>", + "-": "<:Hyphen:1202786436013752350>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202786436013752350>" // TODO +}; + +export const CaffeinatedCharacterTheme: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default CaffeinatedCharacterTheme; \ No newline at end of file diff --git a/src/highlighting/highlighters/ComicSans.ts b/src/highlighting/highlighters/ComicSans.ts new file mode 100644 index 0000000..560b28f --- /dev/null +++ b/src/highlighting/highlighters/ComicSans.ts @@ -0,0 +1,145 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +export const PresentCharacters: PresentCharacterMap = { + "A": "<:A:1202787342625148949>", + "B": "<:B:1202787343489040527>", + "C": "<:C:1202787344306937856>", + "D": "<:D:1202787345233879060>", + "E": "<:E:1202787346882502667>", + "F": "<:F:1202787347955978291>", + "G": "<:G:1202787349348483124>", + "H": "<:H:1202787381388910602>", + "I": "<:I:1202787383192588338>", + "J": "<:J:1202787383968538634>", + "K": "<:K:1202787384790491216>", + "L": "<:L:1202787385893715989>", + "M": "<:M:1202787387495948371>", + "N": "<:N:1202787485718155315>", + "O": "<:O:1202787486976450590>", + "P": "<:P:1202787488502910976>", + "Q": "<:Q:1202787489643757668>", + "R": "<:R:1202787490839138395>", + "S": "<:S:1202787492265463889>", + "T": "<:T:1202787492772712481>", + "U": "<:U:1202787494282657792>", + "V": "<:V:1202787534791245835>", + "W": "<:W:1202787536074711040>", + "X": "<:X:1202787538385903676>", + "Y": "<:Y:1202787539468165140>", + "Z": "<:Z:1202787541204475965>", + "0": "<:0:1202787543138181201>", + "1": "<:1:1202787544484417617>", + "2": "<:2:1202787546094903316>", + "3": "<:3:1202787590676414515>", + "4": "<:4:1202787591494307950>", + "5": "<:5:1202787593197199370>", + "6": "<:6:1202787594123870258>", + "7": "<:7:1202787595126444052>", + "8": "<:8:1202787596527345725>", + "9": "<:9:1202787597600948254>", + "'": "<:Apostrophe:1202787598133895210>", + "@": "<:At:1202787624931033088>", + "-": "<:Hyphen:1202787626717937764>", + + " ": "<:Empty:738324857296650293>", + "any": "<:Blank:1202787340343443497>", + "unknown": "<:Hyphen:1202787626717937764>" // TODO +}; + +export const HighlightedCharacters: CharacterMap = { + "A": "<:A:1202787692962783292>", + "B": "<:B:1202787695122845696>", + "C": "<:C:1202787696142057562>", + "D": "<:D:1202787697731698729>", + "E": "<:E:1202787698713165955>", + "F": "<:F:1202787699954552832>", + "G": "<:G:1202787701015842826>", + "H": "<:H:1202787743793418271>", + "I": "<:I:1202787744670154822>", + "J": "<:J:1202787746096087080>", + "K": "<:K:1202787747983527996>", + "L": "<:L:1202787748864467024>", + "M": "<:M:1202787750227484703>", + "N": "<:N:1202787751125061653>", + "O": "<:O:1202787752517570670>", + "P": "<:P:1202787793286471710>", + "Q": "<:Q:1202787795429756978>", + "R": "<:R:1202787796561952850>", + "S": "<:S:1202787797535035502>", + "T": "<:T:1202787798382542899>", + "U": "<:U:1202787800148213770>", + "V": "<:V:1202787801079353455>", + "W": "<:W:1202787801922412674>", + "X": "<:X:1202787866762285096>", + "Y": "<:Y:1202787868171444254>", + "Z": "<:Z:1202787870364934244>", + "0": "<:0:1202787871254118411>", + "1": "<:1:1202787872617398342>", + "2": "<:2:1202787873380900915>", + "3": "<:3:1202787874316095528>", + "4": "<:4:1202787875280650280>", + "5": "<:5:1202787913503473746>", + "6": "<:6:1202787914522558505>", + "7": "<:7:1202787916800200756>", + "8": "<:8:1202787917781798974>", + "9": "<:9:1202787920277274666>", + "'": "<:Apostrophe:1202787921523114065>", + "@": "<:At:1202787922504589342>", + "-": "<:Hyphen:1202787923095847025>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202787923095847025>" // TODO +} + +export const WildcardCharacters: CharacterMap = { + "A": "<:A:1202788013193691186>", + "B": "<:B:1202788014607302736>", + "C": "<:C:1202788015760478259>", + "D": "<:D:1202788016691617812>", + "E": "<:E:1202788018432380949>", + "F": "<:F:1202788019640213604>", + "G": "<:G:1202788020760215654>", + "H": "<:H:1202788054331293817>", + "I": "<:I:1202788056491626556>", + "J": "<:J:1202788057355653120>", + "K": "<:K:1202788058341056613>", + "L": "<:L:1202788060828270662>", + "M": "<:M:1202788062040428605>", + "N": "<:N:1202788063210901534>", + "O": "<:O:1202788064536166492>", + "P": "<:P:1202788108282888202>", + "Q": "<:Q:1202788109188599828>", + "R": "<:R:1202788111260721212>", + "S": "<:S:1202788112355303515>", + "T": "<:T:1202788113475444826>", + "U": "<:U:1202788115706683433>", + "V": "<:V:1202788116746731550>", + "W": "<:W:1202788118999212072>", + "X": "<:X:1202788154294407239>", + "Y": "<:Y:1202788155246383186>", + "Z": "<:Z:1202788156626305024>", + "0": "<:0:1202788157376954429>", + "1": "<:1:1202788158589108326>", + "2": "<:2:1202788160262766612>", + "3": "<:3:1202788161516732476>", + "4": "<:4:1202788162385092628>", + "5": "<:5:1202788186116325407>", + "6": "<:6:1202788187240665129>", + "7": "<:7:1202788249505112124>", + "8": "<:8:1202788250645958777>", + "9": "<:9:1202788252260765767>", + "'": "<:Apostrophe:1202788253388902420>", + "@": "<:At:1202788254269575198>", + "-": "<:Hyphen:1202788255800627200>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202788255800627200>" // TODO +}; + +export const ComicSansCharacterTheme: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default ComicSansCharacterTheme; \ No newline at end of file diff --git a/src/highlighting/highlighters/Dark.ts b/src/highlighting/highlighters/Dark.ts new file mode 100644 index 0000000..ba0ad04 --- /dev/null +++ b/src/highlighting/highlighters/Dark.ts @@ -0,0 +1,145 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +export const PresentCharacters: PresentCharacterMap = { + "A": "<:A:1202788383970164846>", + "B": "<:B:1202788385178132491>", + "C": "<:C:1202788386465775616>", + "D": "<:D:1202788387908624494>", + "E": "<:E:1202788389359718474>", + "F": "<:F:1202788390689439775>", + "G": "<:G:1202788391591088188>", + "H": "<:H:1202788421551263866>", + "I": "<:I:1202788423338041424>", + "J": "<:J:1202788424264716328>", + "K": "<:K:1202788425174880286>", + "L": "<:L:1202788426190164028>", + "M": "<:M:1202788428538847312>", + "N": "<:N:1202788429742481479>", + "O": "<:O:1202788430325612545>", + "P": "<:P:1202788461417861190>", + "Q": "<:Q:1202788463070548008>", + "R": "<:R:1202788464106410024>", + "S": "<:S:1202788465062969414>", + "T": "<:T:1202788465851498517>", + "U": "<:U:1202788467516637255>", + "V": "<:V:1202788468485390346>", + "W": "<:W:1202788469496352830>", + "X": "<:X:1202788507052150824>", + "Y": "<:Y:1202788507869773866>", + "Z": "<:Z:1202788509614739466>", + "0": "<:0:1202788510550204456>", + "1": "<:1:1202788511552634880>", + "2": "<:2:1202788513209258024>", + "3": "<:3:1202788514366754888>", + "4": "<:4:1202788515365257216>", + "5": "<:5:1202788553172590633>", + "6": "<:6:1202788554749771817>", + "7": "<:7:1202788555793899530>", + "8": "<:8:1202788557043802132>", + "9": "<:9:1202788557987520552>", + "'": "<:Apostrophe:1202788559782940732>", + "@": "<:At:1202788560919597157>", + "-": "<:Hyphen:1202788562009989210>", + + " ": "<:Empty:738324857296650293>", + "any": "<:Blank:1202788383206674492>", + "unknown": "<:Hyphen:1202788562009989210>" // TODO +}; + +export const HighlightedCharacters: CharacterMap = { + "A": "<:A:1202788620864327741>", + "B": "<:B:1202788621879345152>", + "C": "<:C:1202788622789775360>", + "D": "<:D:1202788672731353158>", + "E": "<:E:1202788673586995280>", + "F": "<:F:1202788675059064893>", + "G": "<:G:1202788676032012359>", + "H": "<:H:1202788676942307429>", + "I": "<:I:1202788678427217961>", + "J": "<:J:1202788679505018960>", + "K": "<:K:1202788681124155432>", + "L": "<:L:1202788714166751343>", + "M": "<:M:1202788714854752287>", + "N": "<:N:1202788716993577021>", + "O": "<:O:1202788718067318814>", + "P": "<:P:1202788719476867102>", + "Q": "<:Q:1202788721032691794>", + "R": "<:R:1202788721976541207>", + "S": "<:S:1202788723276910663>", + "T": "<:T:1202788769715978321>", + "U": "<:U:1202788771045572728>", + "V": "<:V:1202788772622630952>", + "W": "<:W:1202788773490991144>", + "X": "<:X:1202788774543757332>", + "Y": "<:Y:1202788776406024272>", + "Z": "<:Z:1202788777429569546>", + "0": "<:0:1202788778281009172>", + "1": "<:1:1202788819146113044>", + "2": "<:2:1202788821922742322>", + "3": "<:3:1202788822841036812>", + "4": "<:4:1202788824430809088>", + "5": "<:5:1202788826058199140>", + "6": "<:6:1202788827278745730>", + "7": "<:7:1202788828369395712>", + "8": "<:8:1202788829191209011>", + "9": "<:9:1202788856630480967>", + "'": "<:Apostrophe:1202788857649831977>", + "@": "<:At:1202788859704901662>", + "-": "<:Hyphen:1202788861667704852>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202788861667704852>" // TODO +} + +export const WildcardCharacters: CharacterMap = { + "A": "<:A:1202788920090427462>", + "B": "<:B:1202788920954196109>", + "C": "<:C:1202788921784930404>", + "D": "<:D:1202788922686709780>", + "E": "<:E:1202788924586729532>", + "F": "<:F:1202788926872485908>", + "G": "<:G:1202788927975456768>", + "H": "<:H:1202788956903579648>", + "I": "<:I:1202788957734309888>", + "J": "<:J:1202788959336529940>", + "K": "<:K:1202788961001537556>", + "L": "<:L:1202788963362930718>", + "M": "<:M:1202788964226961449>", + "N": "<:N:1202789017666453575>", + "O": "<:O:1202789019256233995>", + "P": "<:P:1202789020564856832>", + "Q": "<:Q:1202789021580005406>", + "R": "<:R:1202789022582444062>", + "S": "<:S:1202789023664447569>", + "T": "<:T:1202789024918667334>", + "U": "<:U:1202789026223104040>", + "V": "<:V:1202789062688383028>", + "W": "<:W:1202789064361644033>", + "X": "<:X:1202789065250840637>", + "Y": "<:Y:1202789065905278987>", + "Z": "<:Z:1202789066924490853>", + "0": "<:0:1202789068044369971>", + "1": "<:1:1202789069487345744>", + "2": "<:2:1202789070628061224>", + "3": "<:3:1202789103809331230>", + "4": "<:4:1202789104610185287>", + "5": "<:5:1202789105956552794>", + "6": "<:6:1202789107034497046>", + "7": "<:7:1202789108175470612>", + "8": "<:8:1202789109446221854>", + "9": "<:9:1202789110503313428>", + "'": "<:Apostrophe:1202789111744958504>", + "@": "<:At:1202789132938649620>", + "-": "<:Hyphen:1202789134750711859>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202789134750711859>" // TODO +}; + +export const DarkCharacterTheme: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default DarkCharacterTheme; \ No newline at end of file diff --git a/src/highlighting/highlighters/Default.ts b/src/highlighting/highlighters/Default.ts new file mode 100644 index 0000000..85dfce3 --- /dev/null +++ b/src/highlighting/highlighters/Default.ts @@ -0,0 +1,145 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +export const PresentCharacters: PresentCharacterMap = { + "A": "<:A:1202699461449486406>", + "B": "<:B:1202699462657712288>", + "C": "<:C:1202699464339628083>", + "D": "<:D:1202699466654617652>", + "E": "<:E:1202699467732811836>", + "F": "<:F:1202699468538122261>", + "G": "<:G:1202699470601453579>", + "H": "<:H:1202699471692242964>", + "I": "<:I:1202699963159683072>", + "J": "<:J:1202699965542047774>", + "K": "<:K:1202699473630007366>", + "L": "<:L:1202699966582366308>", + "M": "<:M:1202699967622283264>", + "N": "<:N:1202699968893165628>", + "O": "<:O:1202699971028189304>", + "P": "<:P:1202699477480382586>", + "Q": "<:Q:1202699972185956413>", + "R": "<:R:1202699482064748607>", + "S": "<:S:1202699973922267237>", + "T": "<:T:1202699486766309376>", + "U": "<:U:1202699489220108408>", + "V": "<:V:1202699975314903061>", + "W": "<:W:1202699491057213461>", + "X": "<:X:1202700092520538192>", + "Y": "<:Y:1202699496451080283>", + "Z": "<:Z:1202699498158030939>", + "0": "<:0:1202699977399468084>", + "1": "<:1:1202700093661249557>", + "2": "<:2:1202700096156868678>", + "3": "<:3:1202699980893200444>", + "4": "<:4:1202700097159172247>", + "5": "<:5:1202699503765815366>", + "6": "<:6:1202699985389355129>", + "7": "<:7:1202699507104485486>", + "8": "<:8:1202700099474690089>", + "9": "<:9:1202699508778274896>", + "'": "<:Apostrophe:1202699988145012796>", + "@": "<:At:1202702667248570499>", + "-": "<:Hyphen:1202699511663824978>", + + " ": "<:Empty:738324857296650293>", + "any": "<:Blank:1202699459537145936>", + "unknown": "<:Hyphen:1202699511663824978>" // TODO +}; + +export const HighlightedCharacters: CharacterMap = { + "A": "<:A:1202700312490811412>", + "B": "<:B:1202700314344427563>", + "C": "<:C:1202700322485706783>", + "D": "<:D:1202700541663252513>", + "E": "<:E:1202700543924113469>", + "F": "<:F:1202700544863506583>", + "G": "<:G:1202700546071597096>", + "H": "<:H:1202700547757711360>", + "I": "<:I:1202700550718627912>", + "J": "<:J:1202700552723628062>", + "K": "<:K:1202700553575071821>", + "L": "<:L:1202700557249151037>", + "M": "<:M:1202700558746521600>", + "N": "<:N:1202700559656812604>", + "O": "<:O:1202700845687513099>", + "P": "<:P:1202700848988160030>", + "Q": "<:Q:1202700850032672839>", + "R": "<:R:1202700850984779818>", + "S": "<:S:1202700563675090954>", + "T": "<:T:1202700852612046880>", + "U": "<:U:1202700567739371610>", + "V": "<:V:1202700854612852867>", + "W": "<:W:1202700920060772502>", + "X": "<:X:1202700570138382496>", + "Y": "<:Y:1202700921251962900>", + "Z": "<:Z:1202700923046994000>", + "0": "<:0:1202700924837953576>", + "1": "<:1:1202700573523189840>", + "2": "<:2:1202700926406893678>", + "3": "<:3:1202700957868097546>", + "4": "<:4:1202700578057228288>", + "5": "<:5:1202700997198225419>", + "6": "<:6:1202700997747671111>", + "7": "<:7:1202700999358287952>", + "8": "<:8:1202701000205402264>", + "9": "<:9:1202701001694642316>", + "'": "<:Apostrophe:1202701008443019334>", + "@": "<:At:1202701011009929277>", + "-": "<:Hyphen:1202701012264030280>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202701012264030280>" // TODO +} + +export const WildcardCharacters: CharacterMap = { + "A": "<:A:1202701219152535596>", + "B": "<:B:1202701221153210398>", + "C": "<:C:1202701222138880040>", + "D": "<:D:1202701223220744293>", + "E": "<:E:1202701225104253049>", + "F": "<:F:1202701226291236864>", + "G": "<:G:1202701227184365628>", + "H": "<:H:1202701269735571467>", + "I": "<:I:1202701230602977330>", + "J": "<:J:1202701232230367252>", + "K": "<:K:1202701272051093534>", + "L": "<:L:1202701315000762479>", + "M": "<:M:1202701315856404541>", + "N": "<:N:1202703499922772008>", + "O": "<:O:1202703501969326092>", + "P": "<:P:1202703503508775013>", + "Q": "<:Q:1202703504343433287>", + "R": "<:R:1202703506428010586>", + "S": "<:S:1202703507623256174>", + "T": "<:T:1202703508696998000>", + "U": "<:U:1202703509712142387>", + "V": "<:V:1202703511230353458>", + "W": "<:W:1202703916710629476>", + "X": "<:X:1202703917289443379>", + "Y": "<:Y:1202703919403376710>", + "Z": "<:Z:1202703920657600612>", + "0": "<:0:1202703921794125894>", + "1": "<:1:1202703923891273878>", + "2": "<:2:1202703924952436756>", + "3": "<:3:1202703926714044536>", + "4": "<:4:1202703927708094484>", + "5": "<:5:1202704014928777218>", + "6": "<:6:1202704016430207006>", + "7": "<:7:1202704018590146670>", + "8": "<:8:1202703932460105800>", + "9": "<:9:1202704022168014888>", + "'": "<:Apostrophe:1202703934188429343>", + "@": "<:At:1202704023296147487>", + "-": "<:Hyphen:1202704024638324826>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202704024638324826>" // TODO +}; + +export const DefaultCharacterTheme: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default DefaultCharacterTheme; \ No newline at end of file diff --git a/src/highlighting/highlighters/Green.ts b/src/highlighting/highlighters/Green.ts new file mode 100644 index 0000000..bdb805a --- /dev/null +++ b/src/highlighting/highlighters/Green.ts @@ -0,0 +1,145 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +export const PresentCharacters: PresentCharacterMap = { + "A": "<:A:1202699461449486406>", + "B": "<:B:1202699462657712288>", + "C": "<:C:1202699464339628083>", + "D": "<:D:1202699466654617652>", + "E": "<:E:1202699467732811836>", + "F": "<:F:1202699468538122261>", + "G": "<:G:1202699470601453579>", + "H": "<:H:1202699471692242964>", + "I": "<:I:1202699963159683072>", + "J": "<:J:1202699965542047774>", + "K": "<:K:1202699473630007366>", + "L": "<:L:1202699966582366308>", + "M": "<:M:1202699967622283264>", + "N": "<:N:1202699968893165628>", + "O": "<:O:1202699971028189304>", + "P": "<:P:1202699477480382586>", + "Q": "<:Q:1202699972185956413>", + "R": "<:R:1202699482064748607>", + "S": "<:S:1202699973922267237>", + "T": "<:T:1202699486766309376>", + "U": "<:U:1202699489220108408>", + "V": "<:V:1202699975314903061>", + "W": "<:W:1202699491057213461>", + "X": "<:X:1202700092520538192>", + "Y": "<:Y:1202699496451080283>", + "Z": "<:Z:1202699498158030939>", + "0": "<:0:1202699977399468084>", + "1": "<:1:1202700093661249557>", + "2": "<:2:1202700096156868678>", + "3": "<:3:1202699980893200444>", + "4": "<:4:1202700097159172247>", + "5": "<:5:1202699503765815366>", + "6": "<:6:1202699985389355129>", + "7": "<:7:1202699507104485486>", + "8": "<:8:1202700099474690089>", + "9": "<:9:1202699508778274896>", + "'": "<:Apostrophe:1202699988145012796>", + "@": "<:At:1202702667248570499>", + "-": "<:Hyphen:1202699511663824978>", + + " ": "<:Empty:738324857296650293>", + "any": "<:Blank:1202699459537145936>", + "unknown": "<:Hyphen:1202699511663824978>" // TODO +}; + +export const HighlightedCharacters: CharacterMap = { + "A": "<:A:1202790327249928213>", + "B": "<:B:1202790329141698590>", + "C": "<:C:1202790330068631592>", + "D": "<:D:1202790381583081512>", + "E": "<:E:1202790382463750164>", + "F": "<:F:1202790383961120828>", + "G": "<:G:1202790384867213374>", + "H": "<:H:1202790385642897479>", + "I": "<:I:1202790386418847744>", + "J": "<:J:1202790387723407380>", + "K": "<:K:1202790451619561482>", + "L": "<:L:1202790453230182501>", + "M": "<:M:1202790454169575444>", + "N": "<:N:1202790455469936700>", + "O": "<:O:1202790456321114162>", + "P": "<:P:1202790457910886482>", + "Q": "<:Q:1202790459735543828>", + "R": "<:R:1202790460595245136>", + "S": "<:S:1202790499044425748>", + "T": "<:T:1202790499879231618>", + "U": "<:U:1202790501502296115>", + "V": "<:V:1202790502857056298>", + "W": "<:W:1202790504429781032>", + "X": "<:X:1202790505721630841>", + "Y": "<:Y:1202790506967605318>", + "Z": "<:Z:1202790507835560016>", + "0": "<:0:1202790543890055249>", + "1": "<:1:1202790545181909002>", + "2": "<:2:1202790546561568768>", + "3": "<:3:1202790550403686480>", + "4": "<:4:1202790551414382622>", + "5": "<:5:1202790552018620459>", + "6": "<:6:1202790553390022698>", + "7": "<:7:1202790554887262288>", + "8": "<:8:1202790590757081139>", + "9": "<:9:1202790591830691860>", + "'": "<:Apostrophe:1202790593533714512>", + "@": "<:At:1202790594221441026>", + "-": "<:Hyphen:1202790594968031333>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202790594968031333>" // TODO +} + +export const WildcardCharacters: CharacterMap = { + "A": "<:A:1202790665319354408>", + "B": "<:B:1202790666875179009>", + "C": "<:C:1202790667848388659>", + "D": "<:D:1202790668905226350>", + "E": "<:E:1202790670608367716>", + "F": "<:F:1202790672491479060>", + "G": "<:G:1202790673317756988>", + "H": "<:H:1202790701524586608>", + "I": "<:I:1202790703613349918>", + "J": "<:J:1202790705341136976>", + "K": "<:K:1202790706524192809>", + "L": "<:L:1202790707593478236>", + "M": "<:M:1202790709099233332>", + "N": "<:N:1202790775612641310>", + "O": "<:O:1202790776782979082>", + "P": "<:P:1202790778670157904>", + "Q": "<:Q:1202790779676794900>", + "R": "<:R:1202790780578701332>", + "S": "<:S:1202790781807755314>", + "T": "<:T:1202790782885568553>", + "U": "<:U:1202790784043323412>", + "V": "<:V:1202790820655398942>", + "W": "<:W:1202790821150334998>", + "X": "<:X:1202790822882316348>", + "Y": "<:Y:1202790823721439292>", + "Z": "<:Z:1202790824589529099>", + "0": "<:0:1202790825516470353>", + "1": "<:1:1202790827340865577>", + "2": "<:2:1202790828230058124>", + "3": "<:3:1202790864380764303>", + "4": "<:4:1202790866343690241>", + "5": "<:5:1202790867329490945>", + "6": "<:6:1202790868277403688>", + "7": "<:7:1202790869158334504>", + "8": "<:8:1202790871179731014>", + "9": "<:9:1202790872228433930>", + "'": "<:Apostrophe:1202790873100722248>", + "@": "<:At:1202790896542945292>", + "-": "<:Hyphen:1202790902167511041>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202790902167511041>" // TODO +}; + +export const GreenCharacterTheme: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default GreenCharacterTheme; \ No newline at end of file diff --git a/src/highlighting/highlighters/Lifeboat.ts b/src/highlighting/highlighters/Lifeboat.ts new file mode 100644 index 0000000..90fbbe1 --- /dev/null +++ b/src/highlighting/highlighters/Lifeboat.ts @@ -0,0 +1,145 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +export const PresentCharacters: PresentCharacterMap = { + "A": "<:A:1202790981431468072>", + "B": "<:B:1202790983507640410>", + "C": "<:C:1202790984375599184>", + "D": "<:D:1202790985281572924>", + "E": "<:E:1202790987450155028>", + "F": "<:F:1202790988511186985>", + "G": "<:G:1202790989987713055>", + "H": "<:H:1202791033042243604>", + "I": "<:I:1202791034740932698>", + "J": "<:J:1202791035722535032>", + "K": "<:K:1202791037010055188>", + "L": "<:L:1202791038117347328>", + "M": "<:M:1202791040210436116>", + "N": "<:N:1202791042143887360>", + "O": "<:O:1202791044077588551>", + "P": "<:P:1202791078349119529>", + "Q": "<:Q:1202791080391872542>", + "R": "<:R:1202791081142657107>", + "S": "<:S:1202791082367389696>", + "T": "<:T:1202791083269033995>", + "U": "<:U:1202791085118591067>", + "V": "<:V:1202791086288937061>", + "W": "<:W:1202791087136186428>", + "X": "<:X:1202791141385441280>", + "Y": "<:Y:1202791142152994817>", + "Z": "<:Z:1202791144338100256>", + "0": "<:0:1202791145294405723>", + "1": "<:1:1202791146158424144>", + "2": "<:2:1202791148192800818>", + "3": "<:3:1202791149287252088>", + "4": "<:4:1202791150524698654>", + "5": "<:5:1202791178739646494>", + "6": "<:6:1202791180643995708>", + "7": "<:7:1202791181470277662>", + "8": "<:8:1202791182002823290>", + "9": "<:9:1202791183340802069>", + "'": "<:Apostrophe:1202791184741965864>", + "@": "<:At:1202791185866035230>", + "-": "<:Hyphen:1202791187220668436>", + + " ": "<:Empty:738324857296650293>", + "any": "<:Blank:1202790980537946112>", + "unknown": "<:Hyphen:1202791187220668436>" // TODO +}; + +export const HighlightedCharacters: CharacterMap = { + "A": "<:A:1202791251385257984>", + "B": "<:B:1202791252228182016>", + "C": "<:C:1202791253066907688>", + "D": "<:D:1202791253989793823>", + "E": "<:E:1202791255260532779>", + "F": "<:F:1202791256418426961>", + "G": "<:G:1202791258867892294>", + "H": "<:H:1202791289813467197>", + "I": "<:I:1202791290627035146>", + "J": "<:J:1202791292300558386>", + "K": "<:K:1202791293382557846>", + "L": "<:L:1202791294494052422>", + "M": "<:M:1202791296427761745>", + "N": "<:N:1202791297866408006>", + "O": "<:O:1202791299074363463>", + "P": "<:P:1202791339385692260>", + "Q": "<:Q:1202791340618813460>", + "R": "<:R:1202791342460239953>", + "S": "<:S:1202791343622193152>", + "T": "<:T:1202791344448475206>", + "U": "<:U:1202791345748443196>", + "V": "<:V:1202791346860068884>", + "W": "<:W:1202791347992657940>", + "X": "<:X:1202791382864105595>", + "Y": "<:Y:1202791384445222962>", + "Z": "<:Z:1202791385925689375>", + "0": "<:0:1202791387339292742>", + "1": "<:1:1202791388668760144>", + "2": "<:2:1202791389495296071>", + "3": "<:3:1202791390229299231>", + "4": "<:4:1202791391030153258>", + "5": "<:5:1202791414103150653>", + "6": "<:6:1202791415713759272>", + "7": "<:7:1202791518188867614>", + "8": "<:8:1202791519115804792>", + "9": "<:9:1202791520613306448>", + "'": "<:Apostrophe:1202791521569472563>", + "@": "<:At:1202791522446213150>", + "-": "<:Hyphen:1202791523255844925>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202791523255844925>" // TODO +} + +export const WildcardCharacters: CharacterMap = { + "A": "<:A:1202791595569582100>", + "B": "<:B:1202791597159485480>", + "C": "<:C:1202791598321307715>", + "D": "<:D:1202791599487193148>", + "E": "<:E:1202791600791617596>", + "F": "<:F:1202791601618030642>", + "G": "<:G:1202791602222014465>", + "H": "<:H:1202791633398014023>", + "I": "<:I:1202791634308435998>", + "J": "<:J:1202791636137025546>", + "K": "<:K:1202791637135392808>", + "L": "<:L:1202791638275989556>", + "M": "<:M:1202791639672950865>", + "N": "<:N:1202791640692162600>", + "O": "<:O:1202791641853726720>", + "P": "<:P:1202791674250793023>", + "Q": "<:Q:1202791675680788510>", + "R": "<:R:1202791677736001646>", + "S": "<:S:1202791678566465536>", + "T": "<:T:1202791679615045722>", + "U": "<:U:1202791680961413210>", + "V": "<:V:1202791681758339115>", + "W": "<:W:1202791682584871008>", + "X": "<:X:1202791717623963749>", + "Y": "<:Y:1202791718634655744>", + "Z": "<:Z:1202791720882806824>", + "0": "<:0:1202791722028113940>", + "1": "<:1:1202791722954784779>", + "2": "<:2:1202791724532109353>", + "3": "<:3:1202791725937074236>", + "4": "<:4:1202791726796775497>", + "5": "<:5:1202791756438048878>", + "6": "<:6:1202791757863985173>", + "7": "<:7:1202791758975602688>", + "8": "<:8:1202791759911067668>", + "9": "<:9:1202791761055842344>", + "'": "<:Apostrophe:1202791762569990185>", + "@": "<:At:1202791763505319978>", + "-": "<:Hyphen:1202791764797300797>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202791764797300797>" // TODO +}; + +export const LifeboatCharacterTheme: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default LifeboatCharacterTheme; \ No newline at end of file diff --git a/src/highlighting/highlighters/Lilac.ts b/src/highlighting/highlighters/Lilac.ts new file mode 100644 index 0000000..7d10974 --- /dev/null +++ b/src/highlighting/highlighters/Lilac.ts @@ -0,0 +1,145 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +export const PresentCharacters: PresentCharacterMap = { + "A": "<:A:1202789229034475530>", + "B": "<:B:1202789230921785356>", + "C": "<:C:1202789231785676862>", + "D": "<:D:1202789232821805096>", + "E": "<:E:1202789234340270090>", + "F": "<:F:1202789235753492490>", + "G": "<:G:1202789237137866813>", + "H": "<:H:1202789273368264784>", + "I": "<:I:1202789274945192016>", + "J": "<:J:1202789275956150352>", + "K": "<:K:1202789276878635028>", + "L": "<:L:1202789278082539591>", + "M": "<:M:1202789279500083242>", + "N": "<:N:1202789280624152636>", + "O": "<:O:1202789281798692915>", + "P": "<:P:1202789316397629461>", + "Q": "<:Q:1202789317118795837>", + "R": "<:R:1202789318838587502>", + "S": "<:S:1202789319740358696>", + "T": "<:T:1202789320688279592>", + "U": "<:U:1202789322382647306>", + "V": "<:V:1202789323758633022>", + "W": "<:W:1202789324496699433>", + "X": "<:X:1202789377802109039>", + "Y": "<:Y:1202789378762481664>", + "Z": "<:Z:1202789380272685099>", + "0": "<:0:1202789381191110656>", + "1": "<:1:1202789382260531260>", + "2": "<:2:1202789384206819411>", + "3": "<:3:1202789385343471676>", + "4": "<:4:1202789386635452426>", + "5": "<:5:1202789415462895657>", + "6": "<:6:1202789416951881778>", + "7": "<:7:1202789418008711228>", + "8": "<:8:1202789419128586281>", + "9": "<:9:1202789420227371069>", + "'": "<:Apostrophe:1202789421536256000>", + "@": "<:At:1202789422039441420>", + "-": "<:Hyphen:1202789423394193458>", + + " ": "<:Empty:738324857296650293>", + "any": "<:Blank:1202789228103213167>", + "unknown": "<:Hyphen:1202789423394193458>" // TODO +}; + +export const HighlightedCharacters: CharacterMap = { + "A": "<:A:1202789485641728010>", + "B": "<:B:1202789488233807944>", + "C": "<:C:1202789489018282104>", + "D": "<:D:1202789490326904862>", + "E": "<:E:1202789491115294750>", + "F": "<:F:1202789492004622386>", + "G": "<:G:1202789492885422080>", + "H": "<:H:1202789524242178098>", + "I": "<:I:1202789525840203836>", + "J": "<:J:1202789526762946621>", + "K": "<:K:1202789528063189012>", + "L": "<:L:1202789528805572630>", + "M": "<:M:1202789530583957565>", + "N": "<:N:1202789531560972288>", + "O": "<:O:1202789532345303080>", + "P": "<:P:1202789572304707654>", + "Q": "<:Q:1202789573092966500>", + "R": "<:R:1202789574368165999>", + "S": "<:S:1202789575286849607>", + "T": "<:T:1202789576599408640>", + "U": "<:U:1202789578994352239>", + "V": "<:V:1202789580546252861>", + "W": "<:W:1202789582672891924>", + "X": "<:X:1202789618643238952>", + "Y": "<:Y:1202789619683561493>", + "Z": "<:Z:1202789621608484904>", + "0": "<:0:1202789622543949875>", + "1": "<:1:1202789623617814528>", + "2": "<:2:1202789625341411418>", + "3": "<:3:1202789626238996531>", + "4": "<:4:1202789627052953740>", + "5": "<:5:1202789658619023420>", + "6": "<:6:1202789660313522238>", + "7": "<:7:1202789978195759154>", + "8": "<:8:1202789980481658981>", + "9": "<:9:1202789981647667242>", + "'": "<:Apostrophe:1202789982863888494>", + "@": "<:At:1202789984143155220>", + "-": "<:Hyphen:1202789985418350622>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202789985418350622>" // TODO +} + +export const WildcardCharacters: CharacterMap = { + "A": "<:A:1202790041177428018>", + "B": "<:B:1202790042834042972>", + "C": "<:C:1202790044071366686>", + "D": "<:D:1202790045220610068>", + "E": "<:E:1202790046927949955>", + "F": "<:F:1202790048148492328>", + "G": "<:G:1202790049389740103>", + "H": "<:H:1202790075486969867>", + "I": "<:I:1202790077441245194>", + "J": "<:J:1202790078519451768>", + "K": "<:K:1202790079068897351>", + "L": "<:L:1202790080528392224>", + "M": "<:M:1202790082197594173>", + "N": "<:N:1202790083330052096>", + "O": "<:O:1202790084798185572>", + "P": "<:P:1202790115068616797>", + "Q": "<:Q:1202790116813316136>", + "R": "<:R:1202790118512009236>", + "S": "<:S:1202790119783014410>", + "T": "<:T:1202790121175523368>", + "U": "<:U:1202790122282557490>", + "V": "<:V:1202790123679522826>", + "W": "<:W:1202790126174998528>", + "X": "<:X:1202790165035356190>", + "Y": "<:Y:1202790166394052700>", + "Z": "<:Z:1202790167698743307>", + "0": "<:0:1202790169313284147>", + "1": "<:1:1202790171053916212>", + "2": "<:2:1202790171993571338>", + "3": "<:3:1202790172953944084>", + "4": "<:4:1202790173801189446>", + "5": "<:5:1202790207099904003>", + "6": "<:6:1202790209280942101>", + "7": "<:7:1202790210434244659>", + "8": "<:8:1202790211759906866>", + "9": "<:9:1202790214007791617>", + "'": "<:Apostrophe:1202790215207362560>", + "@": "<:At:1202790216054738984>", + "-": "<:Hyphen:1202790217866674196>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202790217866674196>" // TODO +}; + +export const LilacCharacterTheme: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default LilacCharacterTheme; \ No newline at end of file diff --git a/src/highlighting/highlighters/Rose.ts b/src/highlighting/highlighters/Rose.ts new file mode 100644 index 0000000..c4d3fb1 --- /dev/null +++ b/src/highlighting/highlighters/Rose.ts @@ -0,0 +1,145 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +export const PresentCharacters: PresentCharacterMap = { + "A": "<:A:1202699461449486406>", + "B": "<:B:1202699462657712288>", + "C": "<:C:1202699464339628083>", + "D": "<:D:1202699466654617652>", + "E": "<:E:1202699467732811836>", + "F": "<:F:1202699468538122261>", + "G": "<:G:1202699470601453579>", + "H": "<:H:1202699471692242964>", + "I": "<:I:1202699963159683072>", + "J": "<:J:1202699965542047774>", + "K": "<:K:1202699473630007366>", + "L": "<:L:1202699966582366308>", + "M": "<:M:1202699967622283264>", + "N": "<:N:1202699968893165628>", + "O": "<:O:1202699971028189304>", + "P": "<:P:1202699477480382586>", + "Q": "<:Q:1202699972185956413>", + "R": "<:R:1202699482064748607>", + "S": "<:S:1202699973922267237>", + "T": "<:T:1202699486766309376>", + "U": "<:U:1202699489220108408>", + "V": "<:V:1202699975314903061>", + "W": "<:W:1202699491057213461>", + "X": "<:X:1202700092520538192>", + "Y": "<:Y:1202699496451080283>", + "Z": "<:Z:1202699498158030939>", + "0": "<:0:1202699977399468084>", + "1": "<:1:1202700093661249557>", + "2": "<:2:1202700096156868678>", + "3": "<:3:1202699980893200444>", + "4": "<:4:1202700097159172247>", + "5": "<:5:1202699503765815366>", + "6": "<:6:1202699985389355129>", + "7": "<:7:1202699507104485486>", + "8": "<:8:1202700099474690089>", + "9": "<:9:1202699508778274896>", + "'": "<:Apostrophe:1202699988145012796>", + "@": "<:At:1202702667248570499>", + "-": "<:Hyphen:1202699511663824978>", + + " ": "<:Empty:738324857296650293>", + "any": "<:Blank:1202699459537145936>", + "unknown": "<:Hyphen:1202699511663824978>" // TODO +}; + +export const HighlightedCharacters: CharacterMap = { + "A": "<:A:1202786706483318824>", + "B": "<:B:1202786707376709712>", + "C": "<:C:1202786708689522708>", + "D": "<:D:1202786710753382400>", + "E": "<:E:1202786712254808114>", + "F": "<:F:1202786713311903815>", + "G": "<:G:1202786715903721532>", + "H": "<:H:1202786743892312104>", + "I": "<:I:1202786745457049610>", + "J": "<:J:1202786746685718621>", + "K": "<:K:1202786747680039012>", + "L": "<:L:1202786748246134806>", + "M": "<:M:1202786749860814978>", + "N": "<:N:1202786750947266560>", + "O": "<:O:1202786751677071451>", + "P": "<:P:1202786791115984957>", + "Q": "<:Q:1202786792969867344>", + "R": "<:R:1202786794307977226>", + "S": "<:S:1202786795407020052>", + "T": "<:T:1202786796233035816>", + "U": "<:U:1202786798552481802>", + "V": "<:V:1202786799538409542>", + "W": "<:W:1202786800523808828>", + "X": "<:X:1202786834409852999>", + "Y": "<:Y:1202786836016267314>", + "Z": "<:Z:1202786836959989820>", + "0": "<:0:1202786837492400130>", + "1": "<:1:1202786838608224266>", + "2": "<:2:1202786839547740230>", + "3": "<:3:1202786840776810566>", + "4": "<:4:1202786842064326687>", + "5": "<:5:1202786875774078976>", + "6": "<:6:1202786876688175105>", + "7": "<:7:1202786878856765560>", + "8": "<:8:1202786880077430784>", + "9": "<:9:1202786882141032458>", + "'": "<:Apostrophe:1202786883394867230>", + "@": "<:At:1202786885232099389>", + "-": "<:Hyphen:1202786887383777350>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202786887383777350>" // TODO +} + +export const WildcardCharacters: CharacterMap = { + "A": "<:A:1202786933848281108>", + "B": "<:B:1202786935513288834>", + "C": "<:C:1202786936813650000>", + "D": "<:D:1202786986868342875>", + "E": "<:E:1202786987967258684>", + "F": "<:F:1202786989460561991>", + "G": "<:G:1202786990379106354>", + "H": "<:H:1202786992241250324>", + "I": "<:I:1202786997245181962>", + "J": "<:J:1202787000009363536>", + "K": "<:K:1202787001112338462>", + "L": "<:L:1202787041411076126>", + "M": "<:M:1202787042300526672>", + "N": "<:N:1202787044338966568>", + "O": "<:O:1202787044762324993>", + "P": "<:P:1202787046025072691>", + "Q": "<:Q:1202787047971094568>", + "R": "<:R:1202787049225330738>", + "S": "<:S:1202787050722557953>", + "T": "<:T:1202787087565328405>", + "U": "<:U:1202787090023190579>", + "V": "<:V:1202787091038347304>", + "W": "<:W:1202787091944054831>", + "X": "<:X:1202787093089353738>", + "Y": "<:Y:1202787094548971590>", + "Z": "<:Z:1202787095425318963>", + "0": "<:0:1202787096348069908>", + "1": "<:1:1202787130435444767>", + "2": "<:2:1202787131630686288>", + "3": "<:3:1202787133182705685>", + "4": "<:4:1202787134633680896>", + "5": "<:5:1202787135548301322>", + "6": "<:6:1202787137666420736>", + "7": "<:7:1202787138844889088>", + "8": "<:8:1202787139901980782>", + "9": "<:9:1202787163398344764>", + "'": "<:Apostrophe:1202787164434337903>", + "@": "<:At:1202787166250336297>", + "-": "<:Hyphen:1202787167395516426>", + + " ": "<:Empty:738324857296650293>", + "unknown": "<:Hyphen:1202787167395516426>" // TODO +} + +export const RoseCharacterTheme: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default RoseCharacterTheme; \ No newline at end of file diff --git a/src/highlighting/highlighters/Text.ts b/src/highlighting/highlighters/Text.ts new file mode 100644 index 0000000..fa72caf --- /dev/null +++ b/src/highlighting/highlighters/Text.ts @@ -0,0 +1,66 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +const Characters: CharacterMap = { + " ": " ", + "A": "A", + "B": "B", + "C": "C", + "D": "D", + "E": "E", + "F": "F", + "G": "G", + "H": "H", + "I": "I", + "J": "J", + "K": "K", + "L": "L", + "M": "M", + "N": "N", + "O": "O", + "P": "P", + "Q": "Q", + "R": "R", + "S": "S", + "T": "T", + "U": "U", + "V": "V", + "W": "W", + "X": "X", + "Y": "Y", + "Z": "Z", + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "'": "'", + "@": "@", + "-": "-", + + "unknown": " " +}; + +export const PresentCharacters: PresentCharacterMap = { + ...Characters, + "any": "." +}; + +export const HighlightedCharacters: CharacterMap = { ...Characters }; +for (const key in Characters) { + Characters[key] = `**${Characters[key]}**`; +} + +export const WildcardCharacters: CharacterMap = { ...Characters }; + +export const TextCharacterTheme: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default TextCharacterTheme; \ No newline at end of file diff --git a/src/highlighting/highlighters/Vivi.ts b/src/highlighting/highlighters/Vivi.ts new file mode 100644 index 0000000..23957ff --- /dev/null +++ b/src/highlighting/highlighters/Vivi.ts @@ -0,0 +1,145 @@ +import { CharacterTheme, CharacterMap, PresentCharacterMap } from "../CharacterSet"; + +export const PresentCharacters: PresentCharacterMap = { + "A": "<:A:1267156180480819220>", + "B": "<:B:1267156193403473971>", + "C": "<:C:1267156203771920424>", + "D": "<:D:1267156213854896271>", + "E": "<:E:1267156222927179879>", + "F": "<:F:1267156230171005011>", + "G": "<:G:1267156238085390428>", + "H": "<:H:1267156249158352958>", + "I": "<:I:1267156258213986399>", + "J": "<:J:1267156272067641354>", + "K": "<:K:1267156283694518362>", + "L": "<:L:1267156297716076664>", + "M": "<:M:1267156340124680305>", + "N": "<:N:1267156354104168469>", + "O": "<:O:1267156365022068767>", + "P": "<:P:1267156373700083732>", + "Q": "<:Q:1267156384839893044>", + "R": "<:R:1267156393778221157>", + "S": "<:S:1267156403655802982>", + "T": "<:T:1267156412337885315>", + "U": "<:U:1267156427420729424>", + "V": "<:V:1267156442125828208>", + "W": "<:W:1267156485025304727>", + "X": "<:X:1267156497377529897>", + "Y": "<:Y:1267156508362408031>", + "Z": "<:Z:1267156518780801135>", + "0": "<:0:1267156546979368970>", + "1": "<:1:1267156556823265412>", + "2": "<:2:1267156567245983775>", + "3": "<:3:1267156577413103720>", + "4": "<:4:1267156587085168650>", + "5": "<:5:1267156597470265355>", + "6": "<:6:1267156608182390784>", + "7": "<:7:1267156618022359070>", + "8": "<:8:1267156627413274624>", + "9": "<:9:1267156636137427085>", + "'": "<:Apostrophe:1267156645578936443>", + "@": "<:At:1267156656647569519>", + "-": "<:Hyphen:1267156667100037241>", + + " ": "<:Empty:1267216473013616740>", + "any": "<:Blank:1267156168514470020>", + "unknown": "<:Hyphen:1267156667100037241>" // TODO +}; + +export const HighlightedCharacters: CharacterMap = { + "A": "<:A:1267156700436238447>", + "B": "<:B:1267156709168644130>", + "C": "<:C:1267156717469302904>", + "D": "<:D:1267156724666863616>", + "E": "<:E:1267156732367343718>", + "F": "<:F:1267156738868772875>", + "G": "<:G:1267156746036842527>", + "H": "<:H:1267156754496487499>", + "I": "<:I:1267156762805665792>", + "J": "<:J:1267156770275725395>", + "K": "<:K:1267156780358832241>", + "L": "<:L:1267156790638804994>", + "M": "<:M:1267156797966389301>", + "N": "<:N:1267156805369466880>", + "O": "<:O:1267156812449321091>", + "P": "<:P:1267156820120698964>", + "Q": "<:Q:1267156827200553163>", + "R": "<:R:1267156835157151838>", + "S": "<:S:1267156844174901318>", + "T": "<:T:1267156851770920960>", + "U": "<:U:1267156861623468144>", + "V": "<:V:1267156869961486367>", + "W": "<:W:1267156878396362753>", + "X": "<:X:1267156889028792361>", + "Y": "<:Y:1267156902647955589>", + "Z": "<:Z:1267156912605233304>", + "0": "<:0:1267156921014554644>", + "1": "<:1:1267156952778276924>", + "2": "<:2:1267156964731912334>", + "3": "<:3:1267156974483669043>", + "4": "<:4:1267156986261147783>", + "5": "<:5:1267156994624852071>", + "6": "<:6:1267157004489855017>", + "7": "<:7:1267157013377585327>", + "8": "<:8:1267157041680613417>", + "9": "<:9:1267157050983452712>", + "'": "<:Apostrophe:1267157059653210276>", + "@": "<:At:1267157068708708443>", + "-": "<:Hyphen:1267157080498901002>", + + " ": "<:Empty:1267216473013616740>", + "unknown": "<:Hyphen:1267157080498901002>" // TODO +} + +export const WildcardCharacters: CharacterMap = { + "A": "<:A:1267157136308310169>", + "B": "<:B:1267157146831814796>", + "C": "<:C:1267157154561785958>", + "D": "<:D:1267157161352368301>", + "E": "<:E:1267157168571023492>", + "F": "<:F:1267157179677278433>", + "G": "<:G:1267157188301029449>", + "H": "<:H:1267157198308638751>", + "I": "<:I:1267157205963112519>", + "J": "<:J:1267157214938796092>", + "K": "<:K:1267157223172345917>", + "L": "<:L:1267157230244073566>", + "M": "<:M:1267157240222318653>", + "N": "<:N:1267157247990169703>", + "O": "<:O:1267157256634372126>", + "P": "<:P:1267157264322789479>", + "Q": "<:Q:1267157270924492814>", + "R": "<:R:1267157278377906226>", + "S": "<:S:1267157285806014590>", + "T": "<:T:1267157296904011806>", + "U": "<:U:1267157305968033833>", + "V": "<:V:1267157316025843862>", + "W": "<:W:1267157326331379752>", + "X": "<:X:1267157339832848385>", + "Y": "<:Y:1267157350398164993>", + "Z": "<:Z:1267157360141668423>", + "0": "<:0:1267157372070133861>", + "1": "<:1:1267157381297606850>", + "2": "<:2:1267157389938000003>", + "3": "<:3:1267157398364225558>", + "4": "<:4:1267157405356261509>", + "5": "<:5:1267157413329502331>", + "6": "<:6:1267157421063934033>", + "7": "<:7:1267157428001050736>", + "8": "<:8:1267157436259631260>", + "9": "<:9:1267157444388458578>", + "'": "<:Apostrophe:1267157452395380859>", + "@": "<:At:1267157461173932043>", + "-": "<:Hyphen:1267157469818523721>", + + " ": "<:Empty:1267216473013616740>", + "unknown": "<:Hyphen:1267157469818523721>" // TODO +}; + +export const DefaultCharacterSet: CharacterTheme = { + Present: PresentCharacters, + Highlighted: HighlightedCharacters, + Wildcard: WildcardCharacters +}; + +export default DefaultCharacterSet; \ No newline at end of file From 3daa43aaecba4a5445fb40d5b88456cfef8f1abe Mon Sep 17 00:00:00 2001 From: iminlikewithyou Date: Sun, 28 Jul 2024 15:54:06 -0500 Subject: [PATCH 2/9] fix export on ViviCharacterTheme --- src/highlighting/highlighters/Vivi.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/highlighting/highlighters/Vivi.ts b/src/highlighting/highlighters/Vivi.ts index 23957ff..2999dbe 100644 --- a/src/highlighting/highlighters/Vivi.ts +++ b/src/highlighting/highlighters/Vivi.ts @@ -136,10 +136,10 @@ export const WildcardCharacters: CharacterMap = { "unknown": "<:Hyphen:1267157469818523721>" // TODO }; -export const DefaultCharacterSet: CharacterTheme = { +export const ViviCharacterTheme: CharacterTheme = { Present: PresentCharacters, Highlighted: HighlightedCharacters, Wildcard: WildcardCharacters }; -export default DefaultCharacterSet; \ No newline at end of file +export default ViviCharacterTheme; \ No newline at end of file From 1721dab6f54d97115edcd1455e2268f00bc8ac89 Mon Sep 17 00:00:00 2001 From: iminlikewithyou Date: Sun, 28 Jul 2024 15:54:19 -0500 Subject: [PATCH 3/9] rewrite highlighter logic --- .../highlighters/default/highlighted.ts | 45 ------ .../highlighters/default/present.ts | 45 ------ .../highlighters/default/wildcard.ts | 45 ------ .../highlighters/vivi/highlighted.ts | 45 ------ .../emoji-maps/highlighters/vivi/present.ts | 45 ------ .../emoji-maps/highlighters/vivi/wildcard.ts | 45 ------ src/themes/highlighter.ts | 146 +++++++++--------- 7 files changed, 74 insertions(+), 342 deletions(-) delete mode 100644 assets/emoji-maps/highlighters/default/highlighted.ts delete mode 100644 assets/emoji-maps/highlighters/default/present.ts delete mode 100644 assets/emoji-maps/highlighters/default/wildcard.ts delete mode 100644 assets/emoji-maps/highlighters/vivi/highlighted.ts delete mode 100644 assets/emoji-maps/highlighters/vivi/present.ts delete mode 100644 assets/emoji-maps/highlighters/vivi/wildcard.ts diff --git a/assets/emoji-maps/highlighters/default/highlighted.ts b/assets/emoji-maps/highlighters/default/highlighted.ts deleted file mode 100644 index 97e884c..0000000 --- a/assets/emoji-maps/highlighters/default/highlighted.ts +++ /dev/null @@ -1,45 +0,0 @@ -const defaultHighlightedLetters = { - "A": "<:A:1202700312490811412>", - "B": "<:B:1202700314344427563>", - "C": "<:C:1202700322485706783>", - "D": "<:D:1202700541663252513>", - "E": "<:E:1202700543924113469>", - "F": "<:F:1202700544863506583>", - "G": "<:G:1202700546071597096>", - "H": "<:H:1202700547757711360>", - "I": "<:I:1202700550718627912>", - "J": "<:J:1202700552723628062>", - "K": "<:K:1202700553575071821>", - "L": "<:L:1202700557249151037>", - "M": "<:M:1202700558746521600>", - "N": "<:N:1202700559656812604>", - "O": "<:O:1202700845687513099>", - "P": "<:P:1202700848988160030>", - "Q": "<:Q:1202700850032672839>", - "R": "<:R:1202700850984779818>", - "S": "<:S:1202700563675090954>", - "T": "<:T:1202700852612046880>", - "U": "<:U:1202700567739371610>", - "V": "<:V:1202700854612852867>", - "W": "<:W:1202700920060772502>", - "X": "<:X:1202700570138382496>", - "Y": "<:Y:1202700921251962900>", - "Z": "<:Z:1202700923046994000>", - "0": "<:0:1202700924837953576>", - "1": "<:1:1202700573523189840>", - "2": "<:2:1202700926406893678>", - "3": "<:3:1202700957868097546>", - "4": "<:4:1202700578057228288>", - "5": "<:5:1202700997198225419>", - "6": "<:6:1202700997747671111>", - "7": "<:7:1202700999358287952>", - "8": "<:8:1202701000205402264>", - "9": "<:9:1202701001694642316>", - "'": "<:Apostrophe:1202701008443019334>", - "@": "<:At:1202701011009929277>", - "-": "<:Hyphen:1202701012264030280>", - " ": "<:Blank:1202700311509078086>", - "unknown": "", // TODO - need graphic for unknown -} - -export default defaultHighlightedLetters; \ No newline at end of file diff --git a/assets/emoji-maps/highlighters/default/present.ts b/assets/emoji-maps/highlighters/default/present.ts deleted file mode 100644 index 0ee9f15..0000000 --- a/assets/emoji-maps/highlighters/default/present.ts +++ /dev/null @@ -1,45 +0,0 @@ -const defaultPresentLetters = { - "A": "<:A:1202699461449486406>", - "B": "<:B:1202699462657712288>", - "C": "<:C:1202699464339628083>", - "D": "<:D:1202699466654617652>", - "E": "<:E:1202699467732811836>", - "F": "<:F:1202699468538122261>", - "G": "<:G:1202699470601453579>", - "H": "<:H:1202699471692242964>", - "I": "<:I:1202699963159683072>", - "J": "<:J:1202699965542047774>", - "K": "<:K:1202699473630007366>", - "L": "<:L:1202699966582366308>", - "M": "<:M:1202699967622283264>", - "N": "<:N:1202699968893165628>", - "O": "<:O:1202699971028189304>", - "P": "<:P:1202699477480382586>", - "Q": "<:Q:1202699972185956413>", - "R": "<:R:1202699482064748607>", - "S": "<:S:1202699973922267237>", - "T": "<:T:1202699486766309376>", - "U": "<:U:1202699489220108408>", - "V": "<:V:1202699975314903061>", - "W": "<:W:1202699491057213461>", - "X": "<:X:1202700092520538192>", - "Y": "<:Y:1202699496451080283>", - "Z": "<:Z:1202699498158030939>", - "0": "<:0:1202699977399468084>", - "1": "<:1:1202700093661249557>", - "2": "<:2:1202700096156868678>", - "3": "<:3:1202699980893200444>", - "4": "<:4:1202700097159172247>", - "5": "<:5:1202699503765815366>", - "6": "<:6:1202699985389355129>", - "7": "<:7:1202699507104485486>", - "8": "<:8:1202700099474690089>", - "9": "<:9:1202699508778274896>", - "'": "<:Apostrophe:1202699988145012796>", - "@": "<:At:1202702667248570499>", - "-": "<:Hyphen:1202699511663824978>", - " ": "<:Blank:1202699459537145936>", - "unknown": "", // TODO - need graphic for unknown -} - -export default defaultPresentLetters; \ No newline at end of file diff --git a/assets/emoji-maps/highlighters/default/wildcard.ts b/assets/emoji-maps/highlighters/default/wildcard.ts deleted file mode 100644 index 10ec4d5..0000000 --- a/assets/emoji-maps/highlighters/default/wildcard.ts +++ /dev/null @@ -1,45 +0,0 @@ -const defaultWildcardLetters = { - "A": "<:A:1202701219152535596>", - "B": "<:B:1202701221153210398>", - "C": "<:C:1202701222138880040>", - "D": "<:D:1202701223220744293>", - "E": "<:E:1202701225104253049>", - "F": "<:F:1202701226291236864>", - "G": "<:G:1202701227184365628>", - "H": "<:H:1202701269735571467>", - "I": "<:I:1202701230602977330>", - "J": "<:J:1202701232230367252>", - "K": "<:K:1202701272051093534>", - "L": "<:L:1202701315000762479>", - "M": "<:M:1202701315856404541>", - "N": "<:N:1202703499922772008>", - "O": "<:O:1202703501969326092>", - "P": "<:P:1202703503508775013>", - "Q": "<:Q:1202703504343433287>", - "R": "<:R:1202703506428010586>", - "S": "<:S:1202703507623256174>", - "T": "<:T:1202703508696998000>", - "U": "<:U:1202703509712142387>", - "V": "<:V:1202703511230353458>", - "W": "<:W:1202703916710629476>", - "X": "<:X:1202703917289443379>", - "Y": "<:Y:1202703919403376710>", - "Z": "<:Z:1202703920657600612>", - "0": "<:0:1202703921794125894>", - "1": "<:1:1202703923891273878>", - "2": "<:2:1202703924952436756>", - "3": "<:3:1202703926714044536>", - "4": "<:4:1202703927708094484>", - "5": "<:5:1202704014928777218>", - "6": "<:6:1202704016430207006>", - "7": "<:7:1202704018590146670>", - "8": "<:8:1202703932460105800>", - "9": "<:9:1202704022168014888>", - "'": "<:Apostrophe:1202703934188429343>", - "@": "<:At:1202704023296147487>", - "-": "<:Hyphen:1202704024638324826>", - " ": "<:Blank:1202701217919139921>", - "unknown": "", // TODO - need graphic for unknown -} - -export default defaultWildcardLetters; \ No newline at end of file diff --git a/assets/emoji-maps/highlighters/vivi/highlighted.ts b/assets/emoji-maps/highlighters/vivi/highlighted.ts deleted file mode 100644 index ed8e36d..0000000 --- a/assets/emoji-maps/highlighters/vivi/highlighted.ts +++ /dev/null @@ -1,45 +0,0 @@ -const defaultHighlightedLetters = { - "A": "<:A:1267156700436238447>", - "B": "<:B:1267156709168644130>", - "C": "<:C:1267156717469302904>", - "D": "<:D:1267156724666863616>", - "E": "<:E:1267156732367343718>", - "F": "<:F:1267156738868772875>", - "G": "<:G:1267156746036842527>", - "H": "<:H:1267156754496487499>", - "I": "<:I:1267156762805665792>", - "J": "<:J:1267156770275725395>", - "K": "<:K:1267156780358832241>", - "L": "<:L:1267156790638804994>", - "M": "<:M:1267156797966389301>", - "N": "<:N:1267156805369466880>", - "O": "<:O:1267156812449321091>", - "P": "<:P:1267156820120698964>", - "Q": "<:Q:1267156827200553163>", - "R": "<:R:1267156835157151838>", - "S": "<:S:1267156844174901318>", - "T": "<:T:1267156851770920960>", - "U": "<:U:1267156861623468144>", - "V": "<:V:1267156869961486367>", - "W": "<:W:1267156878396362753>", - "X": "<:X:1267156889028792361>", - "Y": "<:Y:1267156902647955589>", - "Z": "<:Z:1267156912605233304>", - "0": "<:0:1267156921014554644>", - "1": "<:1:1267156952778276924>", - "2": "<:2:1267156964731912334>", - "3": "<:3:1267156974483669043>", - "4": "<:4:1267156986261147783>", - "5": "<:5:1267156994624852071>", - "6": "<:6:1267157004489855017>", - "7": "<:7:1267157013377585327>", - "8": "<:8:1267157041680613417>", - "9": "<:9:1267157050983452712>", - "'": "<:Apostrophe:1267157059653210276>", - "@": "<:At:1267157068708708443>", - "-": "<:Hyphen:1267157080498901002>", - " ": "<:Blank:1267156692492353791>", - "unknown": "", // TODO - need graphic for unknown -} - -export default defaultHighlightedLetters; \ No newline at end of file diff --git a/assets/emoji-maps/highlighters/vivi/present.ts b/assets/emoji-maps/highlighters/vivi/present.ts deleted file mode 100644 index b3b876e..0000000 --- a/assets/emoji-maps/highlighters/vivi/present.ts +++ /dev/null @@ -1,45 +0,0 @@ -const defaultPresentLetters = { - "A": "<:A:1267156180480819220>", - "B": "<:B:1267156193403473971>", - "C": "<:C:1267156203771920424>", - "D": "<:D:1267156213854896271>", - "E": "<:E:1267156222927179879>", - "F": "<:F:1267156230171005011>", - "G": "<:G:1267156238085390428>", - "H": "<:H:1267156249158352958>", - "I": "<:I:1267156258213986399>", - "J": "<:J:1267156272067641354>", - "K": "<:K:1267156283694518362>", - "L": "<:L:1267156297716076664>", - "M": "<:M:1267156340124680305>", - "N": "<:N:1267156354104168469>", - "O": "<:O:1267156365022068767>", - "P": "<:P:1267156373700083732>", - "Q": "<:Q:1267156384839893044>", - "R": "<:R:1267156393778221157>", - "S": "<:S:1267156403655802982>", - "T": "<:T:1267156412337885315>", - "U": "<:U:1267156427420729424>", - "V": "<:V:1267156442125828208>", - "W": "<:W:1267156485025304727>", - "X": "<:X:1267156497377529897>", - "Y": "<:Y:1267156508362408031>", - "Z": "<:Z:1267156518780801135>", - "0": "<:0:1267156546979368970>", - "1": "<:1:1267156556823265412>", - "2": "<:2:1267156567245983775>", - "3": "<:3:1267156577413103720>", - "4": "<:4:1267156587085168650>", - "5": "<:5:1267156597470265355>", - "6": "<:6:1267156608182390784>", - "7": "<:7:1267156618022359070>", - "8": "<:8:1267156627413274624>", - "9": "<:9:1267156636137427085>", - "'": "<:Apostrophe:1267156645578936443>", - "@": "<:At:1267156656647569519>", - "-": "<:Hyphen:1267156667100037241>", - " ": "<:Blank:1267156168514470020>", - "unknown": "", // TODO - need graphic for unknown -} - -export default defaultPresentLetters; \ No newline at end of file diff --git a/assets/emoji-maps/highlighters/vivi/wildcard.ts b/assets/emoji-maps/highlighters/vivi/wildcard.ts deleted file mode 100644 index 692036f..0000000 --- a/assets/emoji-maps/highlighters/vivi/wildcard.ts +++ /dev/null @@ -1,45 +0,0 @@ -const defaultWildcardLetters = { - "A": "<:A:1267157136308310169>", - "B": "<:B:1267157146831814796>", - "C": "<:C:1267157154561785958>", - "D": "<:D:1267157161352368301>", - "E": "<:E:1267157168571023492>", - "F": "<:F:1267157179677278433>", - "G": "<:G:1267157188301029449>", - "H": "<:H:1267157198308638751>", - "I": "<:I:1267157205963112519>", - "J": "<:J:1267157214938796092>", - "K": "<:K:1267157223172345917>", - "L": "<:L:1267157230244073566>", - "M": "<:M:1267157240222318653>", - "N": "<:N:1267157247990169703>", - "O": "<:O:1267157256634372126>", - "P": "<:P:1267157264322789479>", - "Q": "<:Q:1267157270924492814>", - "R": "<:R:1267157278377906226>", - "S": "<:S:1267157285806014590>", - "T": "<:T:1267157296904011806>", - "U": "<:U:1267157305968033833>", - "V": "<:V:1267157316025843862>", - "W": "<:W:1267157326331379752>", - "X": "<:X:1267157339832848385>", - "Y": "<:Y:1267157350398164993>", - "Z": "<:Z:1267157360141668423>", - "0": "<:0:1267157372070133861>", - "1": "<:1:1267157381297606850>", - "2": "<:2:1267157389938000003>", - "3": "<:3:1267157398364225558>", - "4": "<:4:1267157405356261509>", - "5": "<:5:1267157413329502331>", - "6": "<:6:1267157421063934033>", - "7": "<:7:1267157428001050736>", - "8": "<:8:1267157436259631260>", - "9": "<:9:1267157444388458578>", - "'": "<:Apostrophe:1267157452395380859>", - "@": "<:At:1267157461173932043>", - "-": "<:Hyphen:1267157469818523721>", - " ": "<:Blank:1267157100606390387>", - "unknown": "", // TODO - need graphic for unknown -} - -export default defaultWildcardLetters; \ No newline at end of file diff --git a/src/themes/highlighter.ts b/src/themes/highlighter.ts index 8ae70a8..38c9390 100644 --- a/src/themes/highlighter.ts +++ b/src/themes/highlighter.ts @@ -1,15 +1,69 @@ -import { EmojiMap, replaceTextWithLetterMap } from "../emoji-renderer"; +import { CharacterMap, CharacterTheme } from "../highlighting/CharacterSet"; +import CaffeinatedCharacterTheme from "../highlighting/highlighters/Caffeinated"; +import ComicSansCharacterTheme from "../highlighting/highlighters/ComicSans"; +import DarkCharacterTheme from "../highlighting/highlighters/Dark"; +import DefaultCharacterTheme from "../highlighting/highlighters/Default"; +import GreenCharacterTheme from "../highlighting/highlighters/Green"; +import LifeboatCharacterTheme from "../highlighting/highlighters/Lifeboat"; +import LilacCharacterTheme from "../highlighting/highlighters/Lilac"; +import RoseCharacterTheme from "../highlighting/highlighters/Rose"; +import TextCharacterTheme from "../highlighting/highlighters/Text"; +import ViviCharacterTheme from "../highlighting/highlighters/Vivi"; +import { getHighlightedLetters, setHighlightGroups } from "../regex"; -interface HighlighterOptions { - presentEmojiMap: EmojiMap; - highlightedEmojiMap: EmojiMap; - wildcardEmojiMap: EmojiMap; -} +export class Highlighter { + private theme: CharacterTheme; + + constructor(theme: CharacterTheme) { + this.theme = theme; + } + + /** + * Maps a string to a new string using the provided map. + * + * @param string The string to map + * @param map The map to use when converting the string + * @returns The mapped string + */ + private mapText(string: string, map: CharacterMap) { + return string + .toUpperCase() + .split("") + .map((letter) => { + return map[letter] ?? map.unknown; + }) + .join(""); + } + + /** + * Applies the present highlight to a string. + * + * @param string The string to get the present highlight for + * @returns The string with the present highlight applied + */ + getPresent(string: string): string { + return this.mapText(string, this.theme.Present); + } -export abstract class Highlighter { - abstract getPresent(string: string): string; - abstract getHighlighted(string: string): string; - abstract getWildcard(string: string): string; + /** + * Applies the highlighted highlight to a string. + * + * @param string The string to get the highlighted highlight for + * @returns The string with the highlighted highlight applied + */ + getHighlighted(string: string): string { + return this.mapText(string, this.theme.Highlighted); + } + + /** + * Applies the wildcard highlight to a string. + * + * @param string The string to get the wildcard highlight for + * @returns The string with the wildcard highlight + */ + getWildcard(string: string): string { + return this.mapText(string, this.theme.Wildcard); + } /** * Converts a string to one with the letters converted into its highlighted form. @@ -42,72 +96,20 @@ export abstract class Highlighter { } } -export class EmojiHighlighter extends Highlighter implements HighlighterOptions { - presentEmojiMap: EmojiMap; - highlightedEmojiMap: EmojiMap; - wildcardEmojiMap: EmojiMap; - - constructor(options: HighlighterOptions) { - super(); - this.presentEmojiMap = options.presentEmojiMap; - this.highlightedEmojiMap = options.highlightedEmojiMap; - this.wildcardEmojiMap = options.wildcardEmojiMap; - } - - getPresent(string: string): string { - return replaceTextWithLetterMap(string, this.presentEmojiMap); - } - - getHighlighted(string: string): string { - return replaceTextWithLetterMap(string, this.highlightedEmojiMap); - } - - getWildcard(string: string): string { - return replaceTextWithLetterMap(string, this.wildcardEmojiMap); - } -} - -class TextHighlighter extends Highlighter { - getPresent(string: string): string { - return string; - } - - getHighlighted(string: string): string { - return `**${string}**`; - } - - getWildcard(string: string): string { - return this.getHighlighted(string); - } -} - -import defaultPresentEmojiMap from "../../assets/emoji-maps/highlighters/default/present"; -import defaultHighlightedEmojiMap from "../../assets/emoji-maps/highlighters/default/highlighted"; -import defaultWildcardEmojiMap from "../../assets/emoji-maps/highlighters/default/wildcard"; -const DefaultHighlighter = new EmojiHighlighter({ - presentEmojiMap: defaultPresentEmojiMap, - highlightedEmojiMap: defaultHighlightedEmojiMap, - wildcardEmojiMap: defaultWildcardEmojiMap -}); - -import viviPresentEmojiMap from "../../assets/emoji-maps/highlighters/vivi/present"; -import viviHighlightedEmojiMap from "../../assets/emoji-maps/highlighters/vivi/highlighted"; -import viviWildcardEmojiMap from "../../assets/emoji-maps/highlighters/vivi/wildcard"; -import { getHighlightedLetters, setHighlightGroups } from "../regex"; -/** This highlighter must be used when using Vivi from an installed application */ -const ViviHighlighter = new EmojiHighlighter({ - presentEmojiMap: viviPresentEmojiMap, - highlightedEmojiMap: viviHighlightedEmojiMap, - wildcardEmojiMap: viviWildcardEmojiMap -}); - export const Highlighters = { // Themes for OMG - Default: DefaultHighlighter, + Default: new Highlighter(DefaultCharacterTheme), + Caffeinated: new Highlighter(CaffeinatedCharacterTheme), + ComicSans: new Highlighter(ComicSansCharacterTheme), + Dark: new Highlighter(DarkCharacterTheme), + Green: new Highlighter(GreenCharacterTheme), + Lifeboat: new Highlighter(LifeboatCharacterTheme), + Lilac: new Highlighter(LilacCharacterTheme), + Rose: new Highlighter(RoseCharacterTheme), // Highlighters for installed applications - Vivi: ViviHighlighter, + Vivi: new Highlighter(ViviCharacterTheme), // Highlighters for testing - Text: new TextHighlighter() + Text: new Highlighter(TextCharacterTheme) } \ No newline at end of file From f459c110a99df0c4f605a03902ee6cb24f7cc14b Mon Sep 17 00:00:00 2001 From: iminlikewithyou Date: Sun, 28 Jul 2024 16:27:04 -0500 Subject: [PATCH 4/9] refactor file structure for Highlighter module --- .../Highlighter.ts} | 60 +++++++++++++++---- 1 file changed, 47 insertions(+), 13 deletions(-) rename src/{themes/highlighter.ts => highlighting/Highlighter.ts} (60%) diff --git a/src/themes/highlighter.ts b/src/highlighting/Highlighter.ts similarity index 60% rename from src/themes/highlighter.ts rename to src/highlighting/Highlighter.ts index 38c9390..5a0cbc1 100644 --- a/src/themes/highlighter.ts +++ b/src/highlighting/Highlighter.ts @@ -1,15 +1,19 @@ -import { CharacterMap, CharacterTheme } from "../highlighting/CharacterSet"; -import CaffeinatedCharacterTheme from "../highlighting/highlighters/Caffeinated"; -import ComicSansCharacterTheme from "../highlighting/highlighters/ComicSans"; -import DarkCharacterTheme from "../highlighting/highlighters/Dark"; -import DefaultCharacterTheme from "../highlighting/highlighters/Default"; -import GreenCharacterTheme from "../highlighting/highlighters/Green"; -import LifeboatCharacterTheme from "../highlighting/highlighters/Lifeboat"; -import LilacCharacterTheme from "../highlighting/highlighters/Lilac"; -import RoseCharacterTheme from "../highlighting/highlighters/Rose"; -import TextCharacterTheme from "../highlighting/highlighters/Text"; -import ViviCharacterTheme from "../highlighting/highlighters/Vivi"; +import { CharacterMap, CharacterTheme } from "./CharacterSet"; +import CaffeinatedCharacterTheme from "./highlighters/Caffeinated"; +import ComicSansCharacterTheme from "./highlighters/ComicSans"; +import DarkCharacterTheme from "./highlighters/Dark"; +import DefaultCharacterTheme from "./highlighters/Default"; +import GreenCharacterTheme from "./highlighters/Green"; +import LifeboatCharacterTheme from "./highlighters/Lifeboat"; +import LilacCharacterTheme from "./highlighters/Lilac"; +import RoseCharacterTheme from "./highlighters/Rose"; +import TextCharacterTheme from "./highlighters/Text"; +import ViviCharacterTheme from "./highlighters/Vivi"; import { getHighlightedLetters, setHighlightGroups } from "../regex"; +import { CommandInteraction } from "discord.js"; +import { getHighlighterTheme } from "../database/db"; + +type HighlightingBots = "vivi" | "unknown"; export class Highlighter { private theme: CharacterTheme; @@ -94,9 +98,32 @@ export class Highlighter { return emojiString; } + + static fromName(name: string): Highlighter | undefined { + return Highlighters[name]; + } + + static async fromServerInteraction(userID: string): Promise { + const highlighterTheme: string = await getHighlighterTheme(userID); + return Highlighter.fromName(highlighterTheme) ?? DefaultHighlighter; + } + + static async fromCommand(userID: string, guildID: string, fromBot: HighlightingBots): Promise { + if (guildID !== process.env.GUILD_ID) { + switch (fromBot) { + case "vivi": + return Highlighters.Vivi; + } + } + return Highlighter.fromServerInteraction(userID); + } + + static async fromCommandInteraction(interaction: CommandInteraction, fromBot: HighlightingBots): Promise { + return Highlighter.fromCommand(interaction.user.id, interaction.guildId, fromBot); + } } -export const Highlighters = { +const Highlighters = { // Themes for OMG Default: new Highlighter(DefaultCharacterTheme), Caffeinated: new Highlighter(CaffeinatedCharacterTheme), @@ -112,4 +139,11 @@ export const Highlighters = { // Highlighters for testing Text: new Highlighter(TextCharacterTheme) -} \ No newline at end of file +} + +/** + * The default highlighter to use. + * + * Change this if you're working locally and your bot doesn't have access to the emojis, when testing, or something else. + */ +export const DefaultHighlighter = Highlighters.Default; \ No newline at end of file From bbe93c7d032cafe98e4194c075052119982d546a Mon Sep 17 00:00:00 2001 From: iminlikewithyou Date: Sun, 28 Jul 2024 16:28:07 -0500 Subject: [PATCH 5/9] add getHighlighterTheme, from user profile --- src/database/db.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/database/db.ts b/src/database/db.ts index 64bad31..1741b51 100644 --- a/src/database/db.ts +++ b/src/database/db.ts @@ -73,6 +73,11 @@ export async function getCash(user) { return profile.cash || 0; } +export async function getHighlighterTheme(user) { + let profile = await getProfile(user); + return profile.highlighterTheme || "Default"; +} + export async function spendCash(user, amount) { if (amount < 0) return false; let profile = await getProfile(user); From c4b9e3f555261510334e428dfef15d3864e46bf5 Mon Sep 17 00:00:00 2001 From: iminlikewithyou Date: Sun, 28 Jul 2024 16:28:25 -0500 Subject: [PATCH 6/9] fix import --- src/regex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regex.ts b/src/regex.ts index ff06b95..71e7365 100644 --- a/src/regex.ts +++ b/src/regex.ts @@ -1,5 +1,5 @@ import { PromptException, standardizeWord } from "./dictionary/dictionary"; -import { Highlighter } from "./themes/highlighter"; +import { Highlighter } from "./highlighting/Highlighter"; /* Parts of the regex From 4befa493063ec5e254ce8130b9ddc226062c6629 Mon Sep 17 00:00:00 2001 From: iminlikewithyou Date: Sun, 28 Jul 2024 16:28:56 -0500 Subject: [PATCH 7/9] utilize new highlighter functions --- lame-bot/src/word-bomb-mini.ts | 12 +++++++++--- vivi/commands/count.ts | 10 +++++----- vivi/commands/solve.ts | 10 +++++----- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/lame-bot/src/word-bomb-mini.ts b/lame-bot/src/word-bomb-mini.ts index 61d3632..61ff1ff 100644 --- a/lame-bot/src/word-bomb-mini.ts +++ b/lame-bot/src/word-bomb-mini.ts @@ -24,8 +24,8 @@ import { solverCache } from "../../src/dictionary/dictionary"; import { getRemarkEmoji, getStreakNumbers } from "../../src/emoji-renderer"; +import { DefaultHighlighter, Highlighter } from "../../src/highlighting/Highlighter"; import { escapeRegExp, getPromptRegexDisplayText, getPromptRepeatableText } from "../../src/regex"; -import { Highlighters } from "../../src/themes/highlighter"; import { createEnglishList, escapeDiscordMarkdown, formatNumber, formatPercentage, formatPlacement, getCleanName } from "../../src/utils"; import { getChannel, getGuild, lameBotClient, sendMessage, sendMessageAsReply } from "./client"; @@ -128,7 +128,7 @@ async function startRound() { replyMessage, ( getRemarkEmoji("bomb") + " **Quick!** Type a word containing:" + - "\n\n" + getPromptRegexDisplayText(prompt, Highlighters.Default) + " ***。✲゚** (" + formatNumber(solutions) + (solutions === 1 ? " solution)" : " solutions)") + + "\n\n" + getPromptRegexDisplayText(prompt, DefaultHighlighter) + " ***。✲゚** (" + formatNumber(solutions) + (solutions === 1 ? " solution)" : " solutions)") + (lengthRequired ? "\n\n• Must be **" + promptWord.length + "** characters!" : "") ) ); @@ -610,6 +610,11 @@ async function endRound() { }); }; + let highlighter: Highlighter; + const retrieveHighlighterTheme = async () => { + highlighter = await Highlighter.fromServerInteraction(winnerUser); + }; + let startTime2 = Date.now(); await Promise.all([ @@ -622,6 +627,7 @@ async function endRound() { ), lateRemarks(), roundRemarks(), + retrieveHighlighterTheme() ]); console.log("Remarks completed in " + (Date.now() - startTime2) + "ms"); @@ -636,7 +642,7 @@ async function endRound() { )} <@${winnerUser}> solved it! ${getRemarkEmoji("solvedIt")}**\n\n` + getRemarkEmoji("roundEnded") + " **Round ended!**\n" + - Highlighters.Default.highlight(winnerSolution, prompt) + + highlighter.highlight(winnerSolution, prompt) + "\n" + getRemarkText() ); diff --git a/vivi/commands/count.ts b/vivi/commands/count.ts index 5401d23..47c69dd 100644 --- a/vivi/commands/count.ts +++ b/vivi/commands/count.ts @@ -4,7 +4,7 @@ import { formatNumber } from '../../src/utils'; import { cleanWord, solvePromptWithTimeout } from '../../src/dictionary/dictionary'; import { getPromptRegexDisplayText, getPromptRegexFromPromptSearch } from '../../src/regex'; -import { Highlighters } from '../../src/themes/highlighter'; +import { Highlighter } from '../../src/highlighting/Highlighter'; export const data = new SlashCommandBuilder() .setName('count') @@ -34,14 +34,14 @@ export const broadcastable = true; // create function to handle the command export async function execute(interaction: CommandInteraction, preferBroadcast: boolean) { let prompt = interaction.options.get("prompt").value as string; - - const isHomeServer = interaction.guildId === process.env.GUILD_ID; - const highlighter = isHomeServer ? Highlighters.Default : Highlighters.Vivi; try { let regex = getPromptRegexFromPromptSearch(prompt); - let solutions = await solvePromptWithTimeout(regex, 1300, null); + const [highlighter, solutions] = await Promise.all([ + Highlighter.fromCommandInteraction(interaction, "vivi"), + solvePromptWithTimeout(regex, 1300, null) + ]); let solveCount = solutions.length; if (solveCount === 0) { diff --git a/vivi/commands/solve.ts b/vivi/commands/solve.ts index 126ef7b..5dac25b 100644 --- a/vivi/commands/solve.ts +++ b/vivi/commands/solve.ts @@ -3,8 +3,8 @@ import { getInteractionContent, replyToInteraction } from '../../src/command-han import { SortingFunctions, formatNumber, shuffle } from '../../src/utils'; import { solvePromptWithTimeout } from '../../src/dictionary/dictionary'; +import { Highlighter } from '../../src/highlighting/Highlighter'; import { getPromptRegexFromPromptSearch } from '../../src/regex'; -import { Highlighters } from '../../src/themes/highlighter'; export const data = new SlashCommandBuilder() .setName('solve') @@ -53,13 +53,13 @@ export async function execute(interaction: CommandInteraction, preferBroadcast: let prompt = interaction.options.get("prompt").value as string; let sorting: string = interaction.options.get("sorting")?.value as string ?? "None"; - const isHomeServer = interaction.guildId === process.env.GUILD_ID; - const highlighter = isHomeServer ? Highlighters.Default : Highlighters.Vivi; - try { let regex = getPromptRegexFromPromptSearch(prompt); - let solutions: string[] = await solvePromptWithTimeout(regex, 1300, interaction.user.id); + const [highlighter, solutions] = await Promise.all([ + Highlighter.fromCommandInteraction(interaction, "vivi"), + solvePromptWithTimeout(regex, 1300, null) + ]); let solveCount = solutions.length; let solverString = '\nI found ' From c02dc826b778b5b16ac70599c235ad6445bc8b3c Mon Sep 17 00:00:00 2001 From: iminlikewithyou Date: Sun, 28 Jul 2024 16:58:11 -0500 Subject: [PATCH 8/9] bullshit workaround because "any" spaces are complex --- src/highlighting/Highlighter.ts | 11 ++++++++--- src/regex.ts | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/highlighting/Highlighter.ts b/src/highlighting/Highlighter.ts index 5a0cbc1..8f2e1e8 100644 --- a/src/highlighting/Highlighter.ts +++ b/src/highlighting/Highlighter.ts @@ -29,11 +29,14 @@ export class Highlighter { * @param map The map to use when converting the string * @returns The mapped string */ - private mapText(string: string, map: CharacterMap) { + private mapText(string: string, map: CharacterMap, alternateMap?: { [key: string]: string }) { return string .toUpperCase() .split("") .map((letter) => { + if (alternateMap && alternateMap[letter]) { + return alternateMap[letter]; + } return map[letter] ?? map.unknown; }) .join(""); @@ -43,10 +46,12 @@ export class Highlighter { * Applies the present highlight to a string. * * @param string The string to get the present highlight for + * @param spacesAreAny Whether spaces should be treated as wildcard any characters * @returns The string with the present highlight applied */ - getPresent(string: string): string { - return this.mapText(string, this.theme.Present); + getPresent(string: string, spacesAreAny: boolean = false): string { + const alternateMap = spacesAreAny ? { " ": this.theme.Present.any } : undefined; + return this.mapText(string, this.theme.Present, alternateMap); } /** diff --git a/src/regex.ts b/src/regex.ts index 71e7365..56d3130 100644 --- a/src/regex.ts +++ b/src/regex.ts @@ -430,7 +430,7 @@ export function getPromptRegexDisplayText(regex: RegExp, highlighter?: Highlight // check if the regex string has only displayable charaacters. // this is not a perfect check, but it should totally be good enough for our purposes if (!invalidPromptDisplayRegex.test(displayString)) { - return highlighter ? highlighter.getPresent(displayString) : regexString; + return highlighter ? highlighter.getPresent(displayString, true) : regexString; } return highlighter ? "`/" + regexString + "/`" : "/" + regexString + "/"; From 38b0b01ae3ce529d3d598e08230a15ef15b8c8cd Mon Sep 17 00:00:00 2001 From: iminlikewithyou Date: Sun, 28 Jul 2024 16:58:20 -0500 Subject: [PATCH 9/9] markdown is a bitch --- src/highlighting/highlighters/Text.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/highlighting/highlighters/Text.ts b/src/highlighting/highlighters/Text.ts index fa72caf..c4c38b6 100644 --- a/src/highlighting/highlighters/Text.ts +++ b/src/highlighting/highlighters/Text.ts @@ -51,11 +51,11 @@ export const PresentCharacters: PresentCharacterMap = { }; export const HighlightedCharacters: CharacterMap = { ...Characters }; -for (const key in Characters) { - Characters[key] = `**${Characters[key]}**`; -} +// for (const key in Characters) { +// HighlightedCharacters[key] = `**${Characters[key]}**`; +// } -export const WildcardCharacters: CharacterMap = { ...Characters }; +export const WildcardCharacters: CharacterMap = HighlightedCharacters; export const TextCharacterTheme: CharacterTheme = { Present: PresentCharacters,