tent-markdown
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -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": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75384
61
1861