Skip to content

Table inside a list item: raw text in Edit when indented with spaces, and not indented under its bullet #1076

Closed

Description

@Sullti

Version: ZenNotes 2.84.0, Windows 11, "Render tables in live preview" on.

A table nested under a list item (blank line before and after) behaves differently in Edit depending on how it is indented. Preview renders all cases correctly, aligned under the bullet.

  1. Indented with spaces (bullet at 4 spaces, table at 8 or 6 spaces, or bullet at column 0 and table at 4 spaces): Edit shows the table as raw text.
  2. Indented with tabs (two tabs, or one tab plus two spaces): Edit shows the table widget, but at the left edge of the editor with a gap above it, not under its bullet.

Expected: the widget in both cases, indented to the content column of its list item, as in Preview.

Possible cause for 2: packages/app-core/src/lib/cm-table.ts replaces the Table node with a block widget (Decoration.replace({ block: true, ... }), from: node.from). The root div.cm-table-widget gets no indent and the parent ListItem is not read.

Activity

  1. adibhanna commented on Nov 13, 2026

    @adibhanna
    Contributor

    Thanks for the detailed report, @Sullti. Three things were wrong in Edit mode: the editor's Markdown parser misread the divider row of a table indented with spaces (updating @lezer/markdown to 1.6.4 fixes that), the rendered table sat at the left edge instead of under its bullet, and editing a cell wrote the later rows back without their indent, which pulled the table out of the list. A nested table now renders in Edit, lines up under its bullet's text, and keeps every row's indentation when you edit it. Fixed in b350a33, shipping in 2.86.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions