-
Notifications
You must be signed in to change notification settings - Fork 117
Update presentation when typing inside table in sdt #2729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7412,6 +7412,13 @@ const deriveBlockVersion = (block: FlowBlock): string => { | |
| hash = hashString(hash, getRunStringProp(run, 'vertAlign')); | ||
| hash = hashNumber(hash, getRunNumberProp(run, 'baselineShift')); | ||
| } | ||
| } else if (cellBlock?.kind) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this catches all non-paragraph blocks in cells, while
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comment added |
||
| // Keep this broader than layout-bridge cache.ts on purpose: | ||
| // renderer hashes any non-paragraph cell block, while cache.ts hashes | ||
| // nested tables only. If you tighten one side, review the other. | ||
| // Include nested non-paragraph blocks (notably nested tables inside | ||
| // table cells) so edits there invalidate this parent table version. | ||
| hash = hashString(hash, deriveBlockVersion(cellBlock as FlowBlock)); | ||
| } | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works but there's no test for it.
cache.test.tsalready has lots of table tests — adding one for a table-inside-a-table (~30 lines, same pattern) would make sure this path doesn't break silently. worth adding?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added test