Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] #10

Open
koldex opened this issue Feb 23, 2022 · 8 comments
Open

[BUG] #10

koldex opened this issue Feb 23, 2022 · 8 comments
Assignees

Comments

@koldex
Copy link

koldex commented Feb 23, 2022

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]
@ganesshkumar
Copy link
Owner

ganesshkumar commented Feb 23, 2022 via email

@marcusmoore
Copy link

marcusmoore commented May 12, 2022

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
Copy link

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
Copy link

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:

const EXCEL_NEWLINE_ESCAPED_CELL_REGEX = /"([^\t]*(?<=[^\r])\n[^\t]*)"/g;

@ganesshkumar
Copy link
Owner

Open an issue in the upstream dependency package, csholmq/vscode-excel-to-markdown-table#28

@adambkovacs
Copy link

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

@Galacsh
Copy link

Galacsh commented Feb 24, 2023

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.

const EXCEL_NEWLINE_ESCAPED_CELL_REGEX = /"([^\t]*(?<=[^\r])\n[^\t]*)"/g;

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
Copy link

Galacsh commented Feb 24, 2023

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
}

marcusmoore added a commit to marcusmoore/obsidian-excel-to-markdown-table that referenced this issue Apr 28, 2023
Mentioned in this issue
ganesshkumar#10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants