@sup39/hljs-sunscript
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

hljs-SunScript

highlight.js language definition for SunScript

Usage

const hljs = require('highlight.js');
const ss = require('@sup39/hljs-sunscript');

// register language
hljs.registerLanguage('SunScript', ss);
// register alias as needed
hljs.registerAliases(['sunscript', 'ss'], {languageName: 'SunScript'});

CSS

The following classes will be used for highlight:

  • .hljs-comment: comments (//, /* */)
  • .hljs-keyword: keywords (e.g. var, if)
  • .hljs-bracket: {, }, and (, ) after if, for, while
  • .hljs-number: int, float, hex, address (e.g. 39, 12.07, 0xEC0, $80426428)
  • .hljs-string: single-quoted and double-quoted strings (e.g. 'SMS', "サンシャイン")
  • .hljs-logical: && and ||

The following is an sample css for dark theme:

.hljs-comment {
  color: #7d6;
}
.hljs-keyword, .hljs-bracket {
  color: #ffa;
  font-weight: bold;
}
.hljs-number, .hljs-string {
  color: #ffb7e7;
}
.hljs-logical {
  color: #aff;
}

Readme

Keywords

none

Package Sidebar

Install

npm i @sup39/hljs-sunscript

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

2.45 kB

Total Files

5

Last publish

Collaborators

  • sup39