MCPcopy Create free account
hub / github.com/bytesnake/vim-graphical-preview / from_fence

Method from_fence

src/content.rs:30–37  ·  view source on GitHub ↗
(kind: &str)

Source from the content-addressed store, hash-verified

28
29impl ContentType {
30 pub fn from_fence(kind: &str) -> Result<Self> {
31 match kind {
32 "math" => Ok(Self::Math),
33 "gnuplot" => Ok(Self::Gnuplot),
34 "latex" | "tex" => Ok(Self::Tex),
35 _ => Err(Error::UnknownFence(kind.to_string())),
36 }
37 }
38
39 pub fn generate(&self, content: String) -> Result<WrappedWand> {
40 let mut path = self.path(&content);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected