From 6f5ca7db15fb2e1021588fbf0402bad3b8254a0b Mon Sep 17 00:00:00 2001 From: Asherah Connor Date: Tue, 17 Dec 2024 17:45:48 +1100 Subject: [PATCH] document raw node a little more. Remove redundant "plain" output mode; to be added (and tested) if needed. --- src/html.rs | 3 --- src/nodes.rs | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/html.rs b/src/html.rs index 01badf82..07ad630d 100644 --- a/src/html.rs +++ b/src/html.rs @@ -380,9 +380,6 @@ where | NodeValue::HtmlInline(ref literal) => { self.escape(literal.as_bytes())?; } - NodeValue::Raw(ref literal) => { - self.output.write_all(literal.as_bytes())?; - } NodeValue::LineBreak | NodeValue::SoftBreak => { self.output.write_all(b" ")?; } diff --git a/src/nodes.rs b/src/nodes.rs index a034246d..95815f12 100644 --- a/src/nodes.rs +++ b/src/nodes.rs @@ -127,7 +127,8 @@ pub enum NodeValue { /// **Inline**. [Raw HTML](https://github.github.com/gfm/#raw-html) contained inline. HtmlInline(String), - /// **Inline**. A Raw text. + /// **Block/Inline**. A Raw output node. This will be inserted verbatim into CommonMark and + /// HTML output. It can only be created programmatically, and is never parsed from input. Raw(String), /// **Inline**. [Emphasized](https://github.github.com/gfm/#emphasis-and-strong-emphasis)