Skip to main content

escape_markdown

Function escape_markdown 

Source
pub fn escape_markdown(text: &str) -> String
Expand description

Escapes text so Discord renders it literally, on a single line.

Why not escape every punctuation character: - and . only act as markup at the start of a line and followed by a space, so leaving them alone keeps names such as rust-lang/rust.vim@release-v1.0 unchanged. : is escaped because it is what turns a URL into a link.