35 lines
643 B
Rust
35 lines
643 B
Rust
|
mod convert_discord;
|
||
|
mod convert_plain;
|
||
|
|
||
|
pub type MessageContent = Vec<Styled>;
|
||
|
|
||
|
pub enum Styled {
|
||
|
Plain(String),
|
||
|
Link {
|
||
|
target: String,
|
||
|
text: MessageContent,
|
||
|
},
|
||
|
|
||
|
Italic(MessageContent),
|
||
|
Bold(MessageContent),
|
||
|
Strikethrough(MessageContent),
|
||
|
Underline(MessageContent),
|
||
|
|
||
|
Code(String),
|
||
|
CodeBlock {
|
||
|
lang: Option<String>,
|
||
|
source: String,
|
||
|
},
|
||
|
|
||
|
Spoiler {
|
||
|
reason: Option<String>,
|
||
|
content: MessageContent,
|
||
|
},
|
||
|
|
||
|
HardBreak,
|
||
|
BlockQuote(MessageContent),
|
||
|
}
|
||
|
|
||
|
pub use convert_discord::{convert_discord, format_discord};
|
||
|
pub use convert_plain::convert_plain;
|