ganesshkumar / obsidian-table-editor

An Obsidian plugin to provide an editor for Markdown tables. It can open CSV data and data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables from Obsidian Markdown editor.
MIT License
215 stars 15 forks source link

[BUG] "\" Is not processed #9

Closed shunnkou closed 2 years ago

shunnkou commented 2 years ago

Describe the bug When using \ to use a link alias, the "\" doesn't get processed and the link gets split to two columns.

To Reproduce Steps to reproduce the behavior:

  1. In a table, [[enter a link\|with an alias]]
  2. Open the markdown table editor
  3. Two columns show up, split at |

Expected behavior There should be only 1 column, with the alias displayed properly.

Screenshots Error/multiple columns: image

What it normally looks like: image

Desktop (please complete the following information):

ganesshkumar commented 2 years ago

Does this also happen in the markdown editor as well?

I have a table as follows

image

If I go to view mode, the column is broken exactly like how it happens in the plugin's editor.

image

ganesshkumar commented 2 years ago

Same in GitHub markdown preview mode as well

image

So, it looks like we are honoring the general markdown parsing logic. Fixing it in the plugin alone will solve the issue?

FelipeRearden commented 2 years ago

Sorry to step into this conversation @ganesshkumar and @shunnkou :)

@ganesshkumar the Obsidian Syntax for this situation is this

[[link\|document]]

It's the way that Obsidian dela with backlinks inside a md table

Here is the Obsidian document: https://help.obsidian.md/How+to/Format+your+notes#Tables

image

I hope it helps :)

ganesshkumar commented 2 years ago

@FelipeRearden, Thanks a lot! I wasn't aware of this Obsidian Syntax.

Then it makes sense to fix it :)


Sorry to step into this conversation @ganesshkumar and @shunnkou :)

Don't be sorry! Your input is really helpful :)

ganesshkumar commented 2 years ago

This is the state of the latest code. Looks good? wikilink in markdown table

shunnkou commented 2 years ago

Yes, Felipe is correct. Sorry @ganesshkumar I didn't make it clear enough - I didn't realize I had to put the backslash in a code block, it gets processed by github as an escape.

FelipeRearden commented 2 years ago

Don't be sorry! Your input is really helpful :)

Thank you very much @ganesshkumar I'm happy to know my comment helped !!!!!!!

ganesshkumar commented 2 years ago

@shunnkou. I have fixed the issue and made a new release (0.1.1). Also, the plugin is available in the community plugin list. You can download it from there directly 🎉