https://github.com/tylingsoft/markdown-it-highlight
highlight.js plugin for markdown-it
https://github.com/tylingsoft/markdown-it-highlight
Last synced: about 1 year ago
JSON representation
highlight.js plugin for markdown-it
- Host: GitHub
- URL: https://github.com/tylingsoft/markdown-it-highlight
- Owner: tylingsoft
- Created: 2017-02-25T09:02:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-18T13:45:40.000Z (over 8 years ago)
- Last Synced: 2024-04-26T03:44:09.465Z (about 2 years ago)
- Language: JavaScript
- Size: 115 KB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# markdown-it-highlight
highlight.js plugin for [markdown-it](https://github.com/markdown-it/markdown-it).
## install
```
yarn add markdown-it-highlight
```
## usage
### for node.js
```js
import markdownIt from 'markdown-it'
import markdownItHighlight from 'markdown-it-highlight'
const mdi = markdownIt()
mdi.use(markdownItHighlight)
mdi.render(`
print 'hello world'
`) //
print 'hello world'
```
### for browser
You also need to import the css:
```js
import 'markdown-it-highlight/dist/index.css'
```
Or you can add the css to the web page directly.
## Development
### Build
```
yarn build:watch
```
### Test
```
yarn test
```
### Distribution
```
yarn release && npm publish
```
## Todo