Replies: 1 comment
-
Hey! For sections the ids change with the title, which matches the usual behaviour of markdown renderers. This means that links to sections should work fine when rendering notebooks on GitHub. On the other hand links to specific cells wouldn't work. Also, generating the ids based on order feels brittle, it would be pretty easy to change ids without noticing by inserting a cell, and this would break such links. Another aspect is that inserting a cell would add an element with html id that was previously on a different element, so I can imagine some issues with DOM patching. Note that using hashes in cross-notebook links as in #1136 wouldn't work, because |
Beta Was this translation helpful? Give feedback.
-
This is the consequence of #1136. After thinking about it several times, I worked out an idea for the deterministic cell's link.
As we already deterministic section's link by #277 , we could do the same thing for the cell, and cell's id format is:
<section_id>-cell-<nth cell under this section>
. Here, the last segment will start from 0, so the cell links will be#section_id-cell-0
,#section_id-cell-1
, and so on.I did a POC locally and it works. What do you think about this idea? If this is feasible, I could work out a PR for review.
Beta Was this translation helpful? Give feedback.
All reactions