Skip to main content

expand_gfm

Function expand_gfm 

Source
pub fn expand_gfm(input: &str, cdn_prefix: Option<&str>) -> String
Expand description

Expands all GFM constructs in input, returning a new string. Also prefixes local images with a CDN URL if cdn_prefix is set.

ยงExamples

use ssg::markdown_ext::expand_gfm;

// Without GFM-specific syntax the input is preserved verbatim.
let out = expand_gfm("plain text\n", None);
assert_eq!(out, "plain text\n");