(&mut self, lang: &str, body: &str)
| 354 | } |
| 355 | |
| 356 | pub(super) fn code(&mut self, lang: &str, body: &str) -> &mut Self { |
| 357 | let _ = writeln!(self.buf, "```{lang}"); |
| 358 | self.buf.push_str(body); |
| 359 | if !body.ends_with('\n') { |
| 360 | self.buf.push('\n'); |
| 361 | } |
| 362 | self.buf.push_str("```\n"); |
| 363 | self |
| 364 | } |
| 365 | |
| 366 | pub(super) fn render(self) -> String { |
| 367 | self.buf |
no test coverage detected