Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
nano-markdown
Advanced tools
1894 bytes of minified code. Supports heading, paragraphs, code, lists, horizontal rules, bold/italic/del, links and images.
var nmd = require('nano-markdown');
console.log(nmd('test'));
// <p>test</p>
// customizable links
nmd.href = function (ref) {
switch (ref.charAt(0)) {
case '#':
return '/case/'+ref.substr(1);
case '@':
return '/commit/'+ref.substr(1);
}
return ref;
};
console.log(nmd('test\n* [case #44](#44)\n* [commit 750945c](@750945c)'));
// <p>test</p>\n<ul><li><a href='/case/44'>case #44</a></li><li><a href='/commit/750945c'>commit 750945c</a></li></ul>
// customizable headers attributes
nmd.headAttrs = function (level, text) {
return ' id=\''+text.replace(/[^a-z0-9]/ig, '_').replace(/_{2,}/g, '_').replace(/^_*(.*?)_*$/, '$1').toLowerCase()+'\'';
};
console.log(nmd('# Header text'));
// <h1 id='header_text'>Header text</h1>
# foo
## foo
### foo
#### foo
##### foo
###### foo
# foo ############################
## foo ###########################
### foo ##########################
#### foo #########################
##### foo ########################
###### foo #######################
![image alt text](/images/picture.jpg)
![image alt text](/images/picture.jpg "image title text")
[link text](http://github.com)
[open link in new window](+http://github.com)
[link with title](http://github.com "title text")
__bold__, **bold**
_italic_, *italic*
~~deleted text~~
---
- - - -
-- -- -- -- --
------------------------
* unordered list
1. ordered list
1. ordered list
1. ordered list
1. ordered list
* unordered list
// Four spaces indented text
var count = 1000;
while (--count) {
console.log('Wow %d!', count);
}
FAQs
A minimal markdown to html converter
The npm package nano-markdown receives a total of 3,594 weekly downloads. As such, nano-markdown popularity was classified as popular.
We found that nano-markdown 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.