Markdown: MarkdownRenderer, MarkdownEditor, highlights and block ranges read with markdown-rs
CI / site (push) Successful in 32s
CI / platforms (windows-latest) (push) Successful in 4m40s
CI / crate (push) Failing after 29m18s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

The tree comes from markdown::to_mdast with GitHub's flavor and math.
References resolve against their definitions, an image splits its
paragraph, a one-line $$ formula stands as a block. BlockEditor's
import and export keep pulldown-cmark.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-11 23:07:14 -04:00
1 parent bd014707fd
commit fcad0ff8e9
6 files changed
+333 -282

No files matched your search

+3 -3
View File
@@ -5,7 +5,7 @@ use gpui::{
IntoElement, ParentElement, RenderOnce, SharedString, StrikethroughStyle, Styled, StyledText,
UnderlineStyle, Window, div, prelude::*,
};
use pulldown_cmark::Alignment;
use markdown::mdast::AlignKind;
use super::tree::{Inline, Node, Style, parse};
use crate::{
@@ -291,10 +291,10 @@ impl Draw<'_> {
.flex()
.px_3()
.py_1p5()
.when(aligns.get(column) == Some(&Alignment::Right), |cell| {
.when(aligns.get(column) == Some(&AlignKind::Right), |cell| {
cell.justify_end()
})
.when(aligns.get(column) == Some(&Alignment::Center), |cell| {
.when(aligns.get(column) == Some(&AlignKind::Center), |cell| {
cell.justify_center()
})
.when(header, |cell| {