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

tent-markdown

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tent-markdown - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

test/features/links/hashtag_and_autolink.json

23

lib/tent-markdown.js

@@ -17,2 +17,4 @@ // Released under BSD license

var nextBlock = this.dialect.block.hashtags;
if (!urls.length) {

@@ -95,3 +97,3 @@ // no urls matched

if (before.length) {
jsonml = jsonml.concat( this.processInline(before) );
jsonml = jsonml.concat(nextBlock.call(this, before, [], false) || [] );
}

@@ -109,3 +111,3 @@

// process remaining text
jsonml = jsonml.concat( this.processInline(_block) );
jsonml = jsonml.concat(nextBlock.call(this, _block, next, false) || [] );

@@ -115,8 +117,15 @@ return [jsonml];

hashtags: function (block, next) {
hashtags = expose.extractHashtagsWithIndices(block);
hashtags: function (block, next, wrapInPara) {
if (wrapInPara == null) wrapInPara = true;
var hashtags = expose.extractHashtagsWithIndices(block);
var nextBlock = function () {
var _block = this.dialect.block.para.call(this, block, next);
return wrapInPara ? _block : _block[0].slice(1);
}
if (!hashtags.length) {
// no hashtags here, moving along
return;
return nextBlock.call(this);
}

@@ -179,3 +188,3 @@

// there's nothing to autolink
return;
return nextBlock.call(this);
}

@@ -185,3 +194,3 @@

var jsonml = ["para"],
var jsonml = wrapInPara ? ["para"] : [],
_block = block,

@@ -188,0 +197,0 @@ item = null,

{
"name": "tent-markdown",
"version": "0.1.4",
"version": "0.1.5",
"description": "Tent dialect for markdown lib",

@@ -5,0 +5,0 @@ "keywords": [

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