New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hexo-helper-simple-tagcloud

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

hexo-helper-simple-tagcloud - npm Package Compare versions

Comparing version

to
0.1.1

17

lib/index.js

@@ -5,2 +5,17 @@ var _ = {

var escapes = [
{ match: /\s/g, replacement: ' ' },
{ match: /</g, replacement: '&lt;' },
{ match: />/g, replacement: '&gt;' },
];
function escapeTag(text) {
if(text==null)
return '';
return escapes.reduce(function(result, escape){
return result.replace(escape.match, escape.replacement);
}, text);
}
function tagClouds(tags, options) {

@@ -55,3 +70,3 @@ if (!options){

result += '<a href="' + self.url_for(tag.path) + '" style="font-size: ' + size.toFixed(2) + unit + ';">' + tag.name.replace(/\s/g, '&nbsp;') + '</a>';
result += '<a href="' + self.url_for(tag.path) + '" style="font-size: ' + size.toFixed(2) + unit + ';">' + escapeTag(tag.name) + '</a>';
});

@@ -58,0 +73,0 @@

2

package.json
{
"name": "hexo-helper-simple-tagcloud",
"version": "0.1.0",
"version": "0.1.1",
"description": "A simplified and improved tag cloud generator for Hexo.",

@@ -5,0 +5,0 @@ "main": "index.js",

hexo-helper-simple-tagcloud [![NPM version][npm-image]][npm-url] [![Dependency Status][depstat-image]][depstat-url]
================
> A simplified and improved [Hexo] Tag Cloud generator.
> A forked [Hexo] Tag Cloud generator, but with improvements and fixes.

@@ -6,0 +6,0 @@ ## Install