Message Encoding
Messages are encoded in Equion in a similar way to Discord, but Equion also supports LaTeX expressions. Messages are stored as a string, with the following patterns having special meaning.
Patterns
Name | Regex Pattern (Simplified) | Example | Example Parsed |
---|---|---|---|
Block LaTeX (\[ \] delimiters) | /\\\[.*\\\]/ | \[x^2\] | |
Inline LaTeX (\( \) delimiters) | /\\\(.*\\\)/ | \(x^2\) | |
Block LaTeX ($$ $$ delimiters) | /\$\$.*\$\$/ | $$x^2$$ | |
Inline LaTeX ($ $ delimiters) | /\$.*\$/ | $x^2$ | |
Bold | /\*\*.*\*\*/ | **bold** | bold |
Italic | /\*.*\*/ | *italic* | italic |
Underline | /__.*__/ | __underline__ | underline |
Strike | /\~\~.*\~\~/ | ~~strikethrough~~ | |
Ping | /<@[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}>/ | <@115bf718-d12d-11ec-9d64-0242ac120002> | @William Henderson |
Link | /https?:\/\/[^\s]+/ | https://whenderson.dev/blog | https://whenderson.dev/blog |
Note that for pings, the client would type @William Henderson
which would be automatically converted to the ID when the message is sent.