mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-25 10:46:50 -06:00
Integration: format
This commit is contained in:
@@ -794,7 +794,8 @@ fn create_char(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let story = st.doc.text_story(target.story, target.cell).ok_or(designcraft_doc::DocError::NoStory(target.story))?;
|
||||
// Match paragraph fromSelection's first-character/caret policy, but keep paragraph
|
||||
// attributes inherited instead of freezing the fully resolved character properties.
|
||||
let mut format = if target.range.is_empty() { story.char_format_at(target.range.start) } else { story.format_after(target.range.start) }.clone();
|
||||
let mut format =
|
||||
if target.range.is_empty() { story.char_format_at(target.range.start) } else { story.format_after(target.range.start) }.clone();
|
||||
// A bare caret: what typing there would get, as `type.selectionAttrs` reports.
|
||||
if target.range.is_empty() {
|
||||
super::text::with_typing_format(s, &mut format);
|
||||
|
||||
@@ -531,7 +531,6 @@ fn cell_and_table_style_strokes_take_type_and_gap_colour_with_validation() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn split_selected_row_or_column_splits_both_cells() {
|
||||
for horizontal in [true, false] {
|
||||
|
||||
Reference in New Issue
Block a user