-
Notifications
You must be signed in to change notification settings - Fork 678
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
Allow inclusion of note when using reference definitions #808
Allow inclusion of note when using reference definitions #808
Conversation
stupid question: why don't we just remove all (generated) reference definitions from the preview? do they serve a purpose? |
That would lead to the problem for the explicitly defined link references. At this level in the MarkdownIt parser, we can't differentiate between implicit and explicitly generated definitions. |
IIUC:
Does it even make sense to have a definition for an embedded note? there is no link to follow there |
In the context of retaining the definitions for preview, this is correct. In the broader sense, the definitions are there for publication.
All above, correct.
We could create some magic to leave it out there. But, that makes life harder for publishing. Not sure what the best UX is here. I could imagine that even embedding does not work when publishing, I at least can manually follow the link because the definition is there. |
Yeah I think we are aligned. Ok, let's go forward with your original proposal, will comment in code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach sounds good to me, I think it would be good to provide better in-code documentation so that our future selves can understand why we went this route
Looks great, thx! |
Fixes #794.
The idea is that when we want to include a note that is also referred in the link definition, we can just "remove" that definition. This prevents the tokenisation to distort the inclusion format.