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

remove prefix from markdown slugify, normalize name with backlinks to avoid dups #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

haveanicedavid
Copy link

There’s currently a discrepancy between import note ids, which were prefixed with md and slugified in a different way than backlink ids, ie a parsed note with the name Alex MacCaw will have a noteId of md-alex-mac-caw, and another note that references [[Alex MacCaw]] will have a generated backlink ID of alexmaccaw, which can cause duplicates upon iimport.

This normalizes them to the current backlink ID (both will show as alexmaccaw, which allows avoiding duplicates in the main repo + allows replacing backlink html in a way that links any imported backlinks to the appropriate DB note.

Copy link

github-actions bot commented Apr 16, 2024

size-limit report 📦

Path Size
dist/index.js 93.31 KB (+0.14% 🔺)

@haveanicedavid haveanicedavid requested review from vojto and ocavue April 16, 2024 04:05
Copy link
Collaborator

@vojto vojto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before approving I would run this by @maccman since he added the prefix in the first place.

On my end, I rely on those prefixes for debugging - when I want to find out how many notes user imported.

But people don't do large imports from Markdown, only Roam or Readwise, so I don't need these prefixes - but would like to keep them for other importers.

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

Successfully merging this pull request may close these issues.

2 participants