A lightweight TypeScript package for rendering markdown with code highlighting, LaTeX math, and theme support
npm install mini-rendererA lightweight TypeScript package for rendering markdown with code highlighting, LaTeX math, and theme support.

Sample output showing code highlighting, math rendering, and theme support
``bash`
npm install mini-renderer
`typescript
import { MiniRenderer, StyleManager } from 'mini-renderer';
// Initialize renderer and style manager
const renderer = new MiniRenderer();
const styleManager = new StyleManager();
// Inject required styles
styleManager.injectStyles();
// Render content
const content =
\\typescript
const x = "Hello World";
console.log(x);
\\\And some math: $E = mc^2$
Matrix:
$$
\\begin{bmatrix}
1 & 2 \\\\
3 & 4
\\end{bmatrix}
$$;
const output = renderer.render(content);
document.getElementById('output').innerHTML = output;
`
`typescript
// Switch to dark theme
styleManager.setTheme('dark');
// Theme toggle example
function toggleTheme() {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
styleManager.setTheme(newTheme);
}
``
MIT