
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

We need a better Markdown previewer.
pen is a Markdown previewer written in JavaScript, aiming to just work.
There are literally tons of Markdown previewers out there. I love some of them, I even made one of them. Nevertheless, we always need a better one, don't we?
Using pen is super simple, we don't need to install any special editor or
launch any GUI application. pen is just a tidy command-line tool. You can use
your favourite editor and browser. No manual refresh is even needed.
Also, the previewer renders the content using React. It means that it will not re-render entire DOM when the document is updated. This is a huge advantage because images or other media won't be reloaded for the DOM update.
I personally love to use pen, and I hope you love it too. :black_nib:
Here is a short demo showing how awesome pen is.

The following demo shows pen incrementally updates only modified part using
React and its Reconciliation.

pen uses Node.js >= 4.0. It may not work
on earlier versions.
Using npm:
npm i -g pen
You can try using pen with npx:
npx pen
To use pen, simply run the pen command.
pen README.md
The command above will launch a pen server and open the file in your default
browser. The server will listen to a 6060 port by default. To be honest, you
don't even need to launch it with a filename. You can manually open
http://localhost:6060/README.md, or any other files in the same directory.
To stop the server, enter ^C.
For the further details of the pen command, please enter pen -h or pen --help.
Pen uses markdown-it as Markdown parser by default, but it also supports Pandoc. Please provide a proper Pandoc format for the value.
pen --pandoc gfm README.md
I welcome every contribution on pen. You may start from forking and cloning
this repo.
git clone git@github.com:your_username/pen.git
cd pen
# Install dependencies
npm i
# Lint, build, and test pen codes at once
npm test
To build frontend scripts:
npm run build
To lint with ESLint:
npm run lint
To test with Mocha
npm run mocha
Pen is released under the MIT License.
FAQs
A better Markdown previewer
The npm package pen receives a total of 100 weekly downloads. As such, pen popularity was classified as not popular.
We found that pen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.