nehan plugin for code highlighting
- TypeScript 99.6%
- Makefile 0.4%
| .gitignore | ||
| .npmignore | ||
| index.ts | ||
| LICENSE | ||
| Makefile | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| sshot.png | ||
| tsconfig.json | ||
nehan-highlight
nehan plugin for code highlight.
create nehan style
import { PagedNehanDocument, CssStyleSheet } from 'nehan';
import * as HighlightStyle from 'nehan-highlight';
const hljsStyle: CssStyleSheet = HighlightStyle.create({
selector: "pre>code"
});
const pd = new PagedNehanDocument('<pre><code class="lang-typescript">const x: string = "foo"</code></pre>', {
styleSheets:[
hljsStyle, // add highlight style!
]
});
use markup
<pre><code class="lang-typescript">
const x: string = "foo";
</code></pre>
