Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nacmartin/prismsvg
Prismjs tweaked to output svgs
https://github.com/nacmartin/prismsvg
Last synced: 6 days ago
JSON representation
Prismjs tweaked to output svgs
- Host: GitHub
- URL: https://github.com/nacmartin/prismsvg
- Owner: nacmartin
- License: mit
- Created: 2017-06-13T18:46:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-14T16:15:18.000Z (over 7 years ago)
- Last Synced: 2024-10-30T02:43:42.318Z (about 2 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prismsvg
Prismjs tweaked to output SVGs.This is a somewhat dirty adaptation of [Prism.js](http://prismjs.com/) to be able to output SVGs. So you have some code, this produces a syntax highlighted SVG as a result.
```
```And this will output a bunch of tspan nodes with the right classes for syntax highlighting.
This package includes also a css file with the light solarized theme adapted to work with SVGs.
I have copy&pasted the languages that I needed from Prism.js. It should be easy to use your own
languages as long as you keep calling `prismsvg.js` and `prism-cr.js`.I don't know if this is useful for somebody else, so I have just done what I needed. If you want to
use this and your use case is not supported, feel free to open an issue. Thanks.