nehan plugin for code highlighting
  • TypeScript 99.6%
  • Makefile 0.4%
Find a file
2021-06-05 07:26:57 +09:00
.gitignore First commit 2021-03-13 17:43:39 +09:00
.npmignore First commit 2021-03-13 17:43:39 +09:00
index.ts Fix function path 2021-06-05 07:20:00 +09:00
LICENSE First commit 2021-03-13 17:43:39 +09:00
Makefile First commit 2021-03-13 17:43:39 +09:00
package-lock.json 0.1.2 2021-06-05 07:26:57 +09:00
package.json 0.1.2 2021-06-05 07:26:57 +09:00
README.md Added screen shot 2021-04-06 08:25:01 +09:00
sshot.png Added screen shot 2021-04-06 08:25:01 +09:00
tsconfig.json First commit 2021-03-13 17:43:39 +09:00

nehan-highlight

nehan plugin for code highlight.

demo

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>