From 82b87d92ab4f96d8d5ff30d6e0a72bb96f73ee4b Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Mon, 14 Jul 2025 14:30:40 +0800 Subject: [PATCH] text_view: Fix nested Blockquote render in Markdown and HTML. (#1053) image - Also fixed short language name in code block, e.g.: `rs` -> `rust`. --- crates/story/examples/fixtures/test.html | 15 ++- crates/story/examples/fixtures/test.md | 5 + crates/ui/src/highlighter/registry.rs | 33 +++++-- crates/ui/src/text/element.rs | 23 ++++- crates/ui/src/text/html.rs | 114 +++++++---------------- crates/ui/src/text/markdown.rs | 12 +-- 6 files changed, 103 insertions(+), 99 deletions(-) diff --git a/crates/story/examples/fixtures/test.html b/crates/story/examples/fixtures/test.html index 7baebc6c..1ecff5ec 100644 --- a/crates/story/examples/fixtures/test.html +++ b/crates/story/examples/fixtures/test.html @@ -16,8 +16,19 @@

This is a text before blockquote.

This is before paragraph in blockquote. -

This is a second blockquote paragraph.

-

This is after paragraph in blockquote.

+

This is first blockquote paragraph.

+
+

This is second level

+
+

This is third level

+
+ +
    +
  • List item in a blockquote.
  • +
  • Second list item
  • +
+
+ This is after paragraph in blockquote.