瀏覽代碼

[REF-3006] Inline code rendered in rx.markdown has extra trailing space (#3426)

Avoid replacing newlines with whitespaces... these show up in the rendered
output 😱

Fix #3425
Masen Furer 11 月之前
父節點
當前提交
096ecf3113
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      reflex/components/markdown/markdown.py

+ 1 - 1
reflex/components/markdown/markdown.py

@@ -229,7 +229,7 @@ class Markdown(Component):
         Returns:
         Returns:
             The formatted component.
             The formatted component.
         """
         """
-        return str(self.get_component(tag, **props)).replace("\n", " ")
+        return str(self.get_component(tag, **props)).replace("\n", "")
 
 
     def format_component_map(self) -> dict[str, str]:
     def format_component_map(self) -> dict[str, str]:
         """Format the component map for rendering.
         """Format the component map for rendering.