-
It appears that code line ranges use the code block ID as they appear on the page when users select line ranges. An issue with that approach is that when a new code block is added, the blocks under it get a new block ID, and hence the old links that were used to those code blocks are no longer valid. I wonder, is it fair to suggest generating unique IDs for code blocks to alleviate this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Perfectly reasonable request. For this to work, we need to tell the Highlight extension to allow for persistent code block ids. Thus, this would need to be supported upstream in Python Markdown Extensions. Envisioned sample use: ``` .py id="foobar"
print("Hello world")
``` |
Beta Was this translation helpful? Give feedback.
Perfectly reasonable request. For this to work, we need to tell the Highlight extension to allow for persistent code block ids. Thus, this would need to be supported upstream in Python Markdown Extensions. Envisioned sample use: