Table isn’t rendered within header-less callout block

My issues is very similar to this:

In my case, I rarely include a callout header (e.g. > [!info]) at the start of the block and that seems to be what results in my table looking rubbish, like this:

> |  a    | b     | c     |
> |-----|-----|-----|
> |   1   |  2    |  3    |
> |   4   |   5   |  6    |
> |   7   |   8   |   9   |

image|200

If I include the header then it looks fine:

> [!info]
> |  a    | b     | c     |
> |-----|-----|-----|
> |   1   |  2    |  3    |
> |   4   |   5   |  6    |
> |   7   |   8   |   9   |

Please can it be fixed so that my tables look sensible without a callout header?

What’s the bug? If you want a table not being a callout then just remove the quote in front of the table. That is, remove the > in front of each line.

I want the table in the callout

Well, a callout is a block quote with a callout header, and you want to remove the callout header?! Then you’re left with a block quote. It’s not a callout anymore.

On another note, if you search the forums you’ll find plenty of CSS tricks related to changing the appearance of a header, and I reckon you could use that to visually hide them, but I still don’t see the bug.

1 Like

So if I understand correctly you want your table to be rendered with the look of a blockquote (border on the left only) in live preview mode.
You’ll have to use a custom callout for that.

Here’s a custom callout css snippet that you could use for this:

.callout[data-callout="tables"] {
  background: transparent;
  border-left: 2px solid var(--text-accent);
  border-radius: 0px;
}
.callout[data-callout="tables"] .callout-title {
  display: none;
}

Your markdown would look like this (You can use your way of writing tables):

> [!tables]
> a | b | c
> -|-|-
> 1 | 2 | 3
> 4 | 5 | 6
> 7 | 8 | 9

It would render like this:
image

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.