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

Add ability to link to individual lines of code #2

Open
TheWebTech opened this issue Jun 15, 2022 · 1 comment
Open

Add ability to link to individual lines of code #2

TheWebTech opened this issue Jun 15, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@TheWebTech
Copy link
Owner

The problem - if you are trying to help someone it can be helpful to link someone to a specific line of code in a web page. The browser based highlight feature is useful but not perfect for this use case.

Instead we may be able to leverage Prism's functionality. There may be some challenges though as the ids may not be unique for the code blocks given they live in the shadow DOM. There's also the problem that the page loads with the hash before prism has run. So it may take a moment to kick in.
https://prismjs.com/plugins/line-highlight/

@TheWebTech TheWebTech added the enhancement New feature or request label Jun 15, 2022
@TheWebTech TheWebTech self-assigned this Jul 31, 2022
@TheWebTech
Copy link
Owner Author

https://stackoverflow.com/questions/43425398/anchor-tag-a-id-jump-with-hash-inside-shadow-dom

This could be challenging to actually implement due to how ShadowDOM works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant