Remark plugin.

npm install @sugar-high/remark

Markdown in
Highlighted HTML out

Transform fenced code into highlighted HTML.

readme.md
# Built for Markdown

Sugar High turns fenced code into lightweight, highlighted HTML.

```typescript
const message = 'Small API, bright code'
console.log(message)
```

Built for Markdown

Sugar High turns fenced code into lightweight, highlighted HTML.

const message = 'Small API, bright code'
console.log(message)

Usage

remark-plugin.js
import { remark } from 'remark'import { highlight } from '@sugar-high/remark'import html from 'remark-html'const result = await remark()  .use(highlight)  .use(html, { sanitize: false })  .process(markdown)return result.toString()

Across languages

Use every language supported by Sugar High.

script.js
// Here is a simple function
async function hello() {
    console.log('Hello, world from JavaScript!')
    return 123 // return a number
}

await hello()
mod.rs

use std::fs; // Import file system utilities
use std::io::{self, Write}; // Import I/O utilities

/* Read file content into a string */
fn read_file(path: &str) -> io::Result<String> {
    fs::read_to_string(path) // Read file content into a String
}

fn main() {
    match read_file("example.txt") {
        Ok(content) => println!("File content:
{}", content),
        Err(e) => eprintln!("Error reading file: {}", e),
    }
}