SkepticMystic / breadcrumbs

Add typed-links to your Obsidian notes
https://publish.obsidian.md/breadcrumbs-docs
MIT License
533 stars 36 forks source link

Bug: regex not working #490

Closed pawel-ilnicki closed 7 months ago

pawel-ilnicki commented 1 year ago

Describe the bug BC-regex-note does not work on any regex combination, even those tested in online checkers and guaranteed to produce results. Control+S to refresh the index does not work (while setting to refresh on save is on), nor manually refreshing it by clicking the button.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

plugin:breadcrumbs:18837 TypeError: Cannot read properties of null (reading 'test')
    at eval (plugin:breadcrumbs:16683:51)
    at Array.forEach (<anonymous>)
    at eval (plugin:breadcrumbs:16679:13)
    at Array.forEach (<anonymous>)
    at addRegexNotesToGraph (plugin:breadcrumbs:16670:16)
    at buildMainG (plugin:breadcrumbs:18818:5)
    at refreshIndex (plugin:breadcrumbs:18873:24)
    at HTMLButtonElement.click_handler (plugin:breadcrumbs:18967:43)

Throws typeError at line 18837 in plugin:breadcrumbs

files.forEach((file) => addNodesIfNot(mainG, [file.basename]));
    db.end2G("graphs inited", { mainG });
    return mainG;
  } catch (err) {
    (0, import_loglevel13.error)(err); // <---- here
    plugin.db.end2G();
    return mainG;
pawel-ilnicki commented 1 year ago

works on clean test vault

SkepticMystic commented 8 months ago

I've recently reimplemented regex-notes in V4. See here for more info about the changes: https://github.com/SkepticMystic/breadcrumbs/blob/master/V4.md. If you decide to upgrade to the beta, please give regex-notes a try and let me know if this is resolved. See the README for info about regex-notes in V4: https://github.com/SkepticMystic/breadcrumbs/tree/master#regex-notes

SkepticMystic commented 7 months ago

Gonna consider this working in v4, after more testing