New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

nodebb-plugin-github-card

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodebb-plugin-github-card - npm Package Compare versions

Comparing version
0.0.2
to
0.0.3
+4
-2
index.js
(function(module) {
"use strict";
var Card = {};
Card.parse = function(postContent, callback) {
Card.parse = function(data, callback) {
var re = /\[card:(.*?)(\b|\|(.*?)\*(.*)?)\]/gm;
var postContent = data.postData.content;

@@ -10,5 +11,6 @@ if (postContent.match(re)) {

postContent = postContent.replace(re, card);
data.postData.content = postContent;
}
callback(null, postContent);
callback(null, data);
};

@@ -15,0 +17,0 @@

{
"name": "nodebb-plugin-github-card",
"version": "0.0.2",
"version": "0.0.3",
"description": "NodeBB plugin for github card",

@@ -13,2 +13,5 @@ "main": "index.js",

},
"nbbpm": {
"compatibility": "^0.7.0"
},
"keywords": [

@@ -15,0 +18,0 @@ "nodebb",

@@ -8,3 +8,5 @@ {

"hooks": [
{ "hook": "filter:post.parse", "method": "parse", "callbacked": true, "priority": 6 }
{
"hook": "filter:parse.post", "method": "parse", "priority": 6
}
],

@@ -11,0 +13,0 @@ "staticDirs": {

@@ -0,1 +1,3 @@

[Demo](http://swift.tf/topic/94/github-card-plugin)
# nodebb-plugin-github-card

@@ -12,5 +14,5 @@

```
repo card [card:username/repo]
user card [card:username]
width * height `[card:username|400*150]`
```
[card:username/repo] //repo card
[card:username] //user card
[card:username|400*150] //width * height `
```