obsidian-excel-to-markdown-table icon indicating copy to clipboard operation
obsidian-excel-to-markdown-table copied to clipboard

[BUG]

Open koldex opened this issue 3 years ago • 8 comments

Describe the bug This plugin gives an error and fails to load on Obsidian for iOS

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [iPhone13]
  • OS: [iOS 15.3.1]
  • Version [Obsidian 1.1.0 (38), Plugin 0.2.2]

koldex avatar Feb 23 '22 05:02 koldex

Thanks for reporting the issue. Can you please share the error message that you get when you try to install the plugin?

Get Outlook for Androidhttps://aka.ms/ghei36


From: koldex @.> Sent: Wednesday, February 23, 2022 10:57:18 AM To: ganesshkumar/obsidian-excel-to-markdown-table @.> Cc: Ganessh Kumar @.>; Assign @.> Subject: [ganesshkumar/obsidian-excel-to-markdown-table] [BUG] (Issue #10)

Describe the bug This plugin gives an error and fails to load on Obsidian for iOS

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [iPhone13]
  • OS: [iOS 15.3.1]
  • Version [Obsidian 1.1.0 (38), Plugin 0.2.2]

— Reply to this email directly, view it on GitHubhttps://github.com/ganesshkumar/obsidian-excel-to-markdown-table/issues/10, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAQJIMPSDDRNEIBOWTV3EPDU4RV3NANCNFSM5PDK2U2Q. You are receiving this because you were assigned.Message ID: @.***>

ganesshkumar avatar Feb 23 '22 05:02 ganesshkumar

Hi!

I ran into the same issue on iOS 15.4.1 (tested on iPad and iPhone)

The error message displayed at the bottom of the screen is Failed to load plugin obsidian-excel-to-markdown-table.

Is there any way to get more information that would be helpful?

Thanks!

Edit: I updated the error message. I missed part of it the first time.

marcusmoore avatar May 12 '22 17:05 marcusmoore

I was able to get a console log from iOS via the obsidian-mobile-logging plugin.

Here is what is logged when trying to enable the plugin:

[error] Plugin failure: obsidian-excel-to-markdown-table SyntaxError: Invalid regular expression: invalid group specifier name

marcusmoore avatar May 13 '22 01:05 marcusmoore

I was issue-diving other repos and this comment caught my eye which says that regex lookbehinds aren't supported in iOS.

Could this line be the issue: https://github.com/ganesshkumar/obsidian-excel-to-markdown-table/blob/2b1de6275e0ec3ff910cfe90da9c116a7eea3dcb/src/excel-markdown-helpers.ts#L16

marcusmoore avatar May 13 '22 02:05 marcusmoore

Open an issue in the upstream dependency package, https://github.com/csholmq/vscode-excel-to-markdown-table/issues/28

ganesshkumar avatar Jun 17 '22 09:06 ganesshkumar

When I was looking for an easy way to paste tables, @ganesshkumar your plugin looked like the perfect solution 🙂 But if looks like I have the same issue

  • Device: iPad Pro (1st gen)
  • Device OS: iPadOS 16.1.1 (20B101)
  • Obsidian version: 1.4.1. (83) API v1.0.3
  • Plugin version: Excel to Markdown Table 0.4.0

When I try to enable the installed plugin I get the following error:

Failed to load plugin obsidian-excel-to-markdown-table

adambkovacs avatar Jan 03 '23 17:01 adambkovacs

Thanks to @marcusmoore for figuring out it was about regex issue. Now I have no exception on my iPhone!

I've modified the positive lookbehind to negative lookahead, like this below.

https://github.com/ganesshkumar/obsidian-excel-to-markdown-table/blob/2b1de6275e0ec3ff910cfe90da9c116a7eea3dcb/src/excel-markdown-helpers.ts#L16

to

// .obsidian/plugins/obsidian-excel-to-markdown-table/main.js#L104
var EXCEL_NEWLINE_ESCAPED_CELL_REGEX = /"([^\t]*(?!\r)\n[^\t]*)"/g;

Not sure that this regex is enough to do its' all jobs, but works pretty well for me. :)

Galacsh avatar Feb 24 '23 10:02 Galacsh

For those who doesn't need this plugin to work in IOS, just change isDesktopOnly to true.

// .obsidian/plugins/obsidian-excel-to-markdown-table/manifest.json
{
  "id": "obsidian-excel-to-markdown-table",
  "name": "Excel to Markdown Table",
  ...,
  "isDesktopOnly": true // <-- set to true
}

Galacsh avatar Feb 24 '23 10:02 Galacsh