documents: lists go on, block lines shift, tables change, matches show, fences color by language
The document carries Markdown's editing tools for ElyMark (MARK-06): Enter continues a list item or ends an empty one, Tab and Shift-Tab shift an open block's lines, table rows and columns come and go as one undo step, a match shows in any mode, replacements are one step, and a fenced block colors by its language. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2e196a10a7
commit
ce4a1e9cb5
12 files changed
+680
-8
No files matched your search
@@ -14,7 +14,7 @@ use super::{
|
||||
tree::{Inline, Node, Style, parse},
|
||||
};
|
||||
use crate::{
|
||||
editor::code_colors,
|
||||
editor::{code_colors, code_colors_with},
|
||||
navigation::{Anchor, Sections},
|
||||
primitives::{FocusRing as _, Icon, IconName},
|
||||
theme::{ActiveTheme, IconSize, Radius, TextSize},
|
||||
@@ -224,7 +224,12 @@ impl Draw<'_> {
|
||||
text.clone().into(),
|
||||
);
|
||||
}
|
||||
let styles = code_colors(text, cx);
|
||||
// A named fence reads as its language; prose stays plain.
|
||||
let styles = match language.as_deref() {
|
||||
Some(name) => crate::forms::syntax_fenced(name)
|
||||
.map_or_else(Vec::new, |syntax| code_colors_with(text, syntax, cx)),
|
||||
None => code_colors(text, cx),
|
||||
};
|
||||
div()
|
||||
.flex()
|
||||
.flex_col()
|
||||
|
||||
Reference in new issue
Block a user