Gathering detailed insights and metrics for showdown-highlight-pre
Gathering detailed insights and metrics for showdown-highlight-pre
Gathering detailed insights and metrics for showdown-highlight-pre
Gathering detailed insights and metrics for showdown-highlight-pre
🎨 A Showdown extension for highlighting code blocks.
npm install showdown-highlight-pre
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
609
Last Day
1
Last Week
7
Last Month
13
Last Year
124
MIT License
54 Stars
83 Commits
18 Forks
2 Watchers
1 Branches
10 Contributors
Updated on Feb 17, 2025
Minified
Minified + Gzipped
Latest Version
2.1.5
Package Id
showdown-highlight-pre@2.1.5
Unpacked Size
7.27 kB
Size
3.13 kB
File Count
5
NPM Version
6.14.8
Node Version
14.9.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
133.3%
7
Compared to previous week
Last Month
-13.3%
13
Compared to previous month
Last Year
57%
124
Compared to previous year
3
1
A Showdown extension for highlight the code blocks.
This package uses highlight.js
to highlight code blocks in Showdown output. :rocket:
1# Using npm 2npm install --save showdown-highlight 3 4# Using yarn 5yarn add showdown-highlight
1const showdown = require('showdown') 2 , showdownHighlight = require("showdown-highlight") 3 ; 4 5// After requiring the module, use it as extension 6let converter = new showdown.Converter({ 7 // That's it 8 extensions: [showdownHighlight] 9}); 10 11// Now you can Highlight code blocks 12let html = converter.makeHtml(` 13## Highlighting Code with Showdown 14 15Below we have a piece of JavaScript code: 16 17\`\`\`js 18function sayHello (msg, who) { 19 return \`\${who} says: msg\`; 20} 21sayHello("Hello World", "Johnny"); 22\`\`\` 23`); 24 25console.log(html); 26// <h2 id="highlightingcodewithshowdown">Highlighting Code with Showdown</h2> 27// 28// <p>Below we have a piece of JavaScript code:</p> 29// 30// <pre><code class="js language-js"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">sayHello</span> (<span class="hljs-params">msg, who</span>) </span>{ 31// <span class="hljs-keyword">return</span> <span class="hljs-string">`<span class="hljs-subst">${who}</span> says: msg`</span>; 32// } 33// sayHello(<span class="hljs-string">"Hello World"</span>, <span class="hljs-string">"Johnny"</span>); 34// </code></pre>
There are few ways to get help:
Have an idea? Found a bug? See how to contribute.
If you are using this library in one of your projects, add it in this list. :sparkles:
mdpdf
bloggify-markdown-highlight
@kev_nz/publisher
md-toy-blog
markdown2dash
ember-showdown-highlight
trumpdoc
md-srv
md-browse
showit
chimpsky
showdown-html
callete
swanky
tutors-html
@etermind/alex
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 3/12 approved changesets -- score normalized to 2
Reason
1 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More