0.0.4 • Published 11 months ago

zilite v0.0.4

Weekly downloads
-
License
AGPL-3.0-only
Repository
github
Last release
11 months ago

npm.io

Yet another code highlighter.

  • Uses no dependencies.
  • You can contribute more programming languages.
  • Is extremely small size.

How to use?

Just see the following example:

For basic HTML:

<!DOCTYPE html>

<html>

<head>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zilite@0.0.25/src/styles/darkMode.css" />
</head>

<body>
    <div class="language-zig nice-code-block">
        const zilite:[]const u8 = "Syntax Highlighter";
    </div>
    <script type="module">
        import { highlightElements } from "https://cdn.jsdelivr.net/npm/zilite@0.0.25";
        import { zig } from "https://cdn.jsdelivr.net/npm/zilite@0.0.25/src/language/zig.js";
        highlightElements(zig, "language-zig");
    </script>
</body>

</html>

For use as a node module:

npm i zilite
import * as hl from "higherlight";
import { zig } from "higherlight/src/language/zig";

const highlightedCode = hl.highlight(zig, "const x = 'asdf';");
console.log(highlightedCode);

Understood? or Still confused? Create a new issue and clear your doubts.

Contributing:

Please ⭐️ this repo, create pull requests, issues, etc.

0.0.4

11 months ago

0.0.291

11 months ago

0.0.290

11 months ago

0.0.289

11 months ago

0.0.288

11 months ago

0.0.287

11 months ago

0.0.286

11 months ago

0.0.285

11 months ago

0.0.284

11 months ago

0.0.282

11 months ago

0.0.281

11 months ago

0.0.280

11 months ago

0.0.28

11 months ago

0.0.27

11 months ago

0.0.26

11 months ago

0.0.25

11 months ago

0.0.2

11 months ago