wooorm / refractor

Lightweight, robust, elegant virtual syntax highlighting using Prism
MIT License
722 stars 33 forks source link

Prevent Prism’s default behaviour in browser #5

Closed tamagokun closed 6 years ago

tamagokun commented 6 years ago

Prism by default will run highlightAll when loaded in the browser. Setting it to manual will fix this.

tamagokun commented 6 years ago

working on tests.. one moment.

wooorm commented 6 years ago

I think you need to set manual before loading Prism?

tamagokun commented 6 years ago

yeah, figuring that out :D

tamagokun commented 6 years ago

this worked for me, however I'd need to move the refractor require statement up in the test script if you want me to write a test for it.

wooorm commented 6 years ago

What are you proposing? I think we can get away without a test for now, if that would introduce a whole new test harness and stuff like that.

I think, to find the window, something like what Prism does is needed too

tamagokun commented 6 years ago

cool, ok, I think this is looking pretty good. Do you want me to rebase?

tamagokun commented 6 years ago

4

wooorm commented 6 years ago

Thanks, but don’t worry, I’ll just squash it myself, and do a bit of refactoring!

tamagokun commented 6 years ago

sweet, happy to help!

wooorm commented 6 years ago

Published as 2.0.0!

tamagokun commented 6 years ago

wooooo! thank you!