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

Test page: Added share option #2575

Merged
merged 5 commits into from
Dec 22, 2020
Merged

Conversation

RunDevelopment
Copy link
Member

It can be quite useful to share a link to the test page with a specific language but it wasn't possible to share the highlighted text as well.

This PR adds a "Share" link to the test page. The link points to the test page with the current language + text in the URL hash. The link is automatically updated after changes to the current language or text.

Example

image

The href of the "Share" link is #language=markup&text=%3Cb%3Efoo%3C%2Fb%3E.

@mAAdhaTTah
Copy link
Member

I like this idea; would be helpful for people to file bugs too. Can we update the bug template to include suggesting a link to this page?

@RunDevelopment
Copy link
Member Author

In this case, I should probably replace the link with a button that copies the link into the user's clipboard.

@github-actions
Copy link

No JS Changes

Generated by 🚫 dangerJS against 4b27ac8

@RunDevelopment
Copy link
Member Author

I added a little popup around the link.

ffoo

@RunDevelopment RunDevelopment merged commit b5f4f10 into PrismJS:master Dec 22, 2020
@RunDevelopment RunDevelopment deleted the test-share branch December 22, 2020 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants