-
Notifications
You must be signed in to change notification settings - Fork 53
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
Proposed support for UUID anchor IDs #7
Conversation
PARTIAL WORK - default case is now broken, and only works for footnote refs, not inline footnotes
They shouldn't have a dependency on `options`.
IMHO it would be more universal to pass id prefix via
|
Good points. I'll go back and have a look. |
In general:
I think we had to invent a good property name for "document id" (to pass via
Also, please, separate all other things (visual changes) for separate issues. Need to discuss first to find the best solution. |
Ok, if I understand you correctly, we can go ahead with a prefixing solution in this module while we wait for something more general-purpose to surface in CM/markdown-it |
Ugh submitted form accidentally. To continue, sounds like we just need to agree on a property name for defining an optional prefix in this plugin? |
I think, we need to define good doc id property name for |
I will need this feature too in nodeca, to display multiple posts in thread correctly. It was just not very urgent for me. But i'm ready to help with notes about architecture, and promise to accept proper implementation without delays. I think, term "prefix" is not very good, because it can be suffix, for example. IMHO "document id" match better the root of problem. But i'm open to other suggestions. |
Closing in favour of #8 |
This introduces a potential solution for displaying multiple articles/posts/whatever rendered by markdown-it to be displayed on the same page. For example, the index page of a blog may have the full text (including footnotes) of three or more articles, each separately rendered by separate calls into markdown-it. In this case, there will be a collision between footnote 1 of article 1 and footnote 1 of article 2.
This proposed solution introduces an option for using randomly generated anchor IDs, while still displaying regular numerals to the user, as before.
(This PR also includes an option for omitting square brackets in displayed footnote references, which is a requirement for my site...I'm happy to break it into a different PR or remove it entirely if you prefer.)
I know you've been against adding options in the past (I know someone proposed them to remove square brackets in #2) but I'd argue this is an important enough addition to add an option for it.
Happy to receive feedback on this. Thanks!