Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zigistry/zilite
https://github.com/zigistry/zilite
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zigistry/zilite
- Owner: Zigistry
- Created: 2024-09-08T14:59:53.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T21:42:51.000Z (4 months ago)
- Last Synced: 2024-09-13T11:17:56.276Z (4 months ago)
- Language: TypeScript
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![](https://raw.githubusercontent.com/Zigistry/Zilite/main/assets/logo.png)
## 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:
```html
const zilite:[]const u8 = "Syntax Highlighter";
import { highlightElements } from "https://cdn.jsdelivr.net/npm/[email protected]";
import { zig } from "https://cdn.jsdelivr.net/npm/[email protected]/src/language/zig.js";
highlightElements(zig, "language-zig");
```
### For use as a node module:
```bash
npm i zilite
``````js
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.