Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hexo-renderer-mark

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-renderer-mark - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

31

index.js

@@ -6,2 +6,15 @@ "use strict";

var renderer = new marked.Renderer();
renderer.heading = function (text, level) {
var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-');
return '<h' + level + '><a name="' +
escapedText +
'" class="anchor" href="#' +
escapedText +
'"><span class="header-link"></span></a>' +
text + '</h' + level + '>';
};
var config = Object.assign({}, hexo.config.mark);

@@ -23,12 +36,12 @@

function renderer(data, options) {
return marked(data.text);
function _renderer(data, options) {
return marked(data.text, { renderer: renderer });
}
hexo.extend.renderer.register('md', 'html', renderer, true);
hexo.extend.renderer.register('markdown', 'html', renderer, true);
hexo.extend.renderer.register('mkd', 'html', renderer, true);
hexo.extend.renderer.register('mkdn', 'html', renderer, true);
hexo.extend.renderer.register('mdwn', 'html', renderer, true);
hexo.extend.renderer.register('mdtxt', 'html', renderer, true);
hexo.extend.renderer.register('mdtext', 'html', renderer, true);
hexo.extend.renderer.register('md', 'html', _renderer, true);
hexo.extend.renderer.register('markdown', 'html', _renderer, true);
hexo.extend.renderer.register('mkd', 'html', _renderer, true);
hexo.extend.renderer.register('mkdn', 'html', _renderer, true);
hexo.extend.renderer.register('mdwn', 'html', _renderer, true);
hexo.extend.renderer.register('mdtxt', 'html', _renderer, true);
hexo.extend.renderer.register('mdtext', 'html', _renderer, true);
{
"name": "hexo-renderer-mark",
"version": "0.1.0",
"version": "0.1.1",
"description": "hexo plugin to renderer markdown file",

@@ -12,3 +12,2 @@ "main": "index.js",

"dependencies": {
"hexo-util": "^0.6.0",
"highlight.js": "^9.5.0",

@@ -15,0 +14,0 @@ "marked": "^0.3.5"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc