-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Updated test.html with support for testing the plugins #592
base: master
Are you sure you want to change the base?
Conversation
@Golmote I've merged your changes into this branch |
@Golmote any updates? |
I don't have much time to properly test this, for the moment. |
@Golmote, sure, take your time. Maybe you have propositions how to make it better? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to test this myself, but I love the idea of including plugins on the test page. Got some minor changes / suggestions first.
@VitaliyR Our apologies on the delay! I know its been a while, but would you be interested in making the changes suggested here? |
|
||
$('#prism').remove(); | ||
$$('script[data-type="plugin"],link[data-type="plugin"]').forEach(function (script) { | ||
script.remove(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use an iframe whose srcset
is set dynamically for the demo :)
PS: Awwww, I wish we could remove <script>
elements and have their effects undone, that would be so nicely reactive! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, yes, indeed. It was done (probably? 2 years has passed..) for more clean html structure, I guess.. But later I'm realoading Prism core js file - so it will be run again and we will receive clean object.
Doing everything in iframes is better and nice idea also
Oki, here're few changes.
|
@mAAdhaTTah Is this going to get merged anytime soon? |
@RunDevelopment I'm not sure this has been addressed (or even how to address it). Although I think the point of clobbering & replacing the global |
FYI: Updated PR and replied to your comment |
fa7b33a
to
f2a13c9
Compare
@RunDevelopment We have a PR to add line-numbers to the test page. Do we / can we combine it with this? |
(Didn't mean to close) |
@mAAdhaTTah I don't see why we would need #1554 after this. |
Separated PR from #584 which is upgrading test.html so it can now test the plugins too.
Not the best solution is used, but it is working. Prism core object is being updated while any of plugin is loaded and for clearing it out from plugin's mixins we need to reload it. It's done via reattaching prism.js script file.