![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Glow is a small, but powerful syntax highligher for web:
Glow is the default highlighter for Nue web framework and works there "out of the box". Here's how to use Glow as a standalone library:
bun i nue-glow
// import highlighter
import { glow } from 'nue-glow'
const code = '<h1>Hello, World</h1>'
// render code
const html = glow(code, { language: 'html', numbered: true })
console.info(html) // <code language="html">...</code>
numbered
is a boolean flag indicating whether line numbers should be rendered.
language
tells Glow the language of the code. This is optional. When not provided, Glow attempts to guess the language. If you are formatting Markdown, the language parameter "md" must be given so that Glow can deal with all the special cases like "-" starts a new list item, instead of a deleted line.
<code language="html">...</code>
Here's how you integrate Glow to Marked:
import { marked } from 'marked'
import { glow } from 'nue-glow'
// setup a custom renderer for code blocks
const renderer = {
code(input, language) {
const html = glow(input, { language, numbered: true })
return `<pre>${ html }</pre>`
}
}
marked.use({ renderer })
// read Markdown with a Glow-formatted code block
const content = '...'
const html = marked.parse(content)
FAQs
Markdown syntax highlighter for CSS developers
The npm package nue-glow receives a total of 68 weekly downloads. As such, nue-glow popularity was classified as not popular.
We found that nue-glow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.