A simple HTML document
+
+ This is a paragraph inside a div element, have
+ code text.
+
This is second paragraph.
++ 这是一个中文演示段落,用于展示更多的 + Markdown GFM + 内容。これは日本語のデモ段落です。の多言語サポートを示すためのテキストが含まれています。 +
+List
+ Example for Bulleted and Numbered List: + +Numbered List
+ Text before the Numbered List. +-
+
-
+ Numbered item 1
+
-
+
- Sub item 1 +
- Sub item 2 +
+ - Numbered item 2 +
- Numbered item 3 +
Bulleted List
+ Text before the Bulleted List. +-
+
-
+ Bullet 1
+
-
+
- Sub Numbered 1 +
- Sub Numbered 2 +
+ - Bullet 2 +
Table
+ Text before the table. +| Head 1 | +Head 2 | +
|---|---|
| Cell 1 | +Cell 2 | +
| Cell 3 | +Cell 4 | +
"#;
+ let node = super::parse_html(html).unwrap();
+ assert_eq!(
+ node,
+ Node::Paragraph(Paragraph::Image {
+ span: None,
+ image: super::ImageNode {
+ url: "https://example.com/image.png".to_string().into(),
+ alt: Some("Example".to_string().into()),
+ width: Some(px(100.).into()),
+ height: Some(px(200.).into()),
+ title: Some("Example Image".to_string().into())
+ }
+ })
+ );
+
+ let html = r#"