A way to “unload” plugins
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
I have a project using Prism to perform server-side rendering (similar to node). Simple rendering works well, but I’m facing problems with plugins. A plugin can be loaded simply by running the appropriate JavaScript file, but there seems to be no way to undo the process. Say I want to render two code blocks, first one with line numbers, and second one without—there is no way to do this unless I construct a new Prism instance for each one of them. Is it possible to add some kind of mechanism?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Prism plugins are loaded and how separate Prism instances are created for server-side rendering. Compare the two rendering cases described in the issue and determine what unload behavior is needed for plugin-specific state. Done means plugins can be enabled for one render and absent from a later render without constructing a new Prism instance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100