Show errors for why tables aren't rendered

Use case or problem

It’s well known that Obsidian has lots of room for improvement for how it handles tables. Tables in Obsidian require very specific formatting, which is very easy to mess up and confuse users on why their tables don’t render.

I’ve had this issue myself a few times, where I’d stare at every single character in tables to see why it wouldn’t render, including recently when Obsidian updated and started requiring spaces above Markdown tables, to conform to Markdown standard(s).

Proposed solution

Let’s say I have a proper table like this:

And I change gfx.webrender.all to remove the second `, then it looks like this:

Obsidian could Scan the note continuously or periodically (like an IDE does for syntax & code errors) to see if any of the text is supposed to be or resembles the syntax for a table, and show error messages for why it doesn’t render a table, showing / mentioning missing or improper characters, or when characters like `s for inline closed aren’t closed.

Perhaps it could show a tooltip pointing to the line with the error, with a message like “missing closing character on this line, character 20.”

Screenshot 2023-06-28 at 5.50.45 PM

Interesting idea! I don’t know enough to know. But I wonder if Markdown is even deterministic enough to allow this. A change in your input that leads to a table not rendering, isn’t particularly an “error”. It’s parsing what you put into it. I can imagine this being a fairly complex problem.

But there are existing community plugins that assist with the formatting, to help avoid syntax problems. Advanced Tables. Table Generator. Markdown Table Editor. As a workaround for the time being, have you explored any of those yet?

At the very least, I’d want to be able to select markdown and for Obsidian to check if its close or supposed to be a table, and if not, what the markdown issue is. None of those plugins you mentioned can detect errors or reasons why tables wouldn’t render.

Those plugins help you not type tables manually.

I want to be able to detect errors for pre-existing markdown tables in Markdown files not made in Obsidian, or with those plugins.