(kind: &str)
| 28 | |
| 29 | impl 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); |
nothing calls this directly
no outgoing calls
no test coverage detected