vsch / idea-multimarkdown

Markdown language support for IntelliJ IDEA.
https://plugins.jetbrains.com/plugin/7896-markdown-navigator
Apache License 2.0
816 stars 129 forks source link

Tables aren't recognised or rendered #796

Closed ajlane closed 4 years ago

ajlane commented 4 years ago

Tables are rendered as a single line of text, no matter what I do.

Even if I use the toolbar to insert the table, I can't use any toolbar buttons to modify it, because no table is detected.

image

OS: Ubuntu 19.04 IDE: PyCharm 2019.3. Plugin: Markdown Navigator 2.9.9

I've tried deleting everything and starting again, changing the file line endings, and using the zero-width character locator plugin to try to find hidden characters (there weren't any). I've tried small tables and large tables. I've tried formatting them myself, leaving them unformatted, and enabling the auto formatter (which doesn't do anything either).

A copy of the pictured markdown:

Test

| Header  |
|---|
| Value  |
vsch commented 4 years ago

@ajlane, tables should be enabled by default in the parser but just to make sure, in your parser settings you should see Tables extension checked. The profile drop down gives a quick setup for a couple of supported profile types. Select GitHub documents to create GitHub compatible parser settings which include table extension.

The syntax highlighting is missing in your screenshot so I suspect the parser extension for tables is not enabled. It should look like this:

image

Check the parser settings:

image

It seems to me that plugin settings on your system are messed up. The preview does not look right either. Did you try the 2.9.8 version of the plugin before? It had a bug which showed up on some UX and Windows systems. It could mess up settings.

To remove settings, you can use the Project Files view in PyCharm and remove the highlighted files and directory from the .idea directory:

image

Let me know if this does not help and I will have to look for more complex causes. It is definitely not standard.

ajlane commented 4 years ago

You're right, tables weren't enabled in the parser settings. The Parser Profile was set to Custom and all of parser options were unchecked. Now that I've switched to one of the built-in profiles, I can see tables in the preview just fine.

I have no idea how I got those custom settings - it was a fresh install and a new project. I haven't installed 2.9.8 before.

vsch commented 4 years ago

@ajlane, the only way this could happen is the settings were blown away.

If you started a 2019.3 version of the IDE before a compatible plugin version was available, the IDE suggested a really old version from the crypt. Installing that one and restarting the IDE would blow away all the new plugin settings because the ancient version of the plugin had different setting layout.

You should delete the markdown navigator project settings for any project which has no options selected. This will reset the settings to defaults. Otherwise, you will discovering missing options piece-meal. Flea catching is easier.

I put my navigator project settings under VCS. I tweak these per project and loosing them is a serious PITA for me.

vsch commented 4 years ago

@ajlane, I will check if fresh install has an issue or something else is involved.

vsch commented 4 years ago

@ajlane, I just realized there is an easier way to reset all settings. I added this for a user who messed up their settings and wanted an easy way to return to defaults. Completely forgot about it.

image
ajlane commented 4 years ago

Okay, I've reset the settings, and the default parser settings did indeed have tables and other features enabled.

vsch commented 4 years ago

@ajlane, fixed plugin released. It was a bug that was causing settings to initialize empty. Fixed and added code to correct settings if they are empty.