phoebe/src/message_ast/mod.rs

35 lines
643 B
Rust
Raw Normal View History

2021-08-12 09:47:38 +00:00
mod convert_discord;
2021-09-10 04:44:00 +00:00
mod convert_plain;
2021-08-12 09:47:38 +00:00
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),
}
2021-09-10 04:44:00 +00:00
pub use convert_discord::{convert_discord, format_discord};
pub use convert_plain::convert_plain;