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

Replace my.cdn in code sample with example.com #2906

Merged
merged 3 commits into from
May 15, 2021
Merged

Replace my.cdn in code sample with example.com #2906

merged 3 commits into from
May 15, 2021

Conversation

d34dman
Copy link
Contributor

@d34dman d34dman commented May 15, 2021

The code samples in Usage with CDN is not clear enough. One might copy paste it and expect to work. Which would not, since the links are placeholders and needs to be replaced with actual entries from CDN.

This PR aims to make it little more obvious that, they are example links.

I used example.com because,

  • It is a reserved domain for such cases, more info in this wiki page.
  • It would provide a nice feedback to the user while reading the code it self.
  • Visiting the urls won't result in an error, and give a page stating that it is used for example purpose.

As a bonus, am wondering if this also future proofs it, in case somebody do register my.cdn and use the link for malicious purpose.

@github-actions
Copy link

github-actions bot commented May 15, 2021

No JS Changes

Generated by 🚫 dangerJS against e989dde

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@mAAdhaTTah
Copy link
Member

The other idea I had when I was doing this last night is to use Handlebars syntax {{cdn}} or something like that so it's very clearly a placeholder/variable.

@RunDevelopment
Copy link
Member

So something like https://{{cdn}}/prism@v1.x/themes/prism.css?

Sounds good. It's short and unambiguous.

d34dman and others added 2 commits May 15, 2021 23:51
Co-authored-by: Michael Schmidt <mitchi5000.ms@googlemail.com>
@d34dman
Copy link
Contributor Author

d34dman commented May 15, 2021

@RunDevelopment I have done the changes requested, please review :)

@RunDevelopment RunDevelopment merged commit 8047118 into PrismJS:master May 15, 2021
@RunDevelopment
Copy link
Member

Thank you for contributing @d34dman!

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.

None yet

3 participants