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.1 to 0.1.2

test/features/links/autolink/within_backticks.json

16

lib/tent-markdown.js

@@ -33,2 +33,7 @@ // Released under BSD license

if ( (_m = block.match(/\[[^\]]+\]\([^\)]+\)$/)) && (_m.index < item.indices[0]) && (_m.index + _m[0].length > item.indices[0]) ) {
// markdown link syntax, don't autolink
continue;
}
if ( block.slice(item.indices[0] - 1, block.length).match(/^\[[^\]]+\]\([^\)]+\)/) ) {

@@ -53,3 +58,3 @@ // url inside markdown link display text, don't autolink

for (var j = 0; j < _indices.length; j += 2) {
if ( (_indices[j] < item.indices[0]) && (_indices[j+1] > item.indices[1]) ) {
if ( (_indices[j] < item.indices[0]) && (_indices[j+1] >= item.indices[1]) ) {
// matched url is inside code backticks, ignore

@@ -228,7 +233,7 @@ _last_index = _indices[j+1];

"~": function italic( text ) {
// Inline content is possible inside `bold text`
"~": function strikethrough( text ) {
// Inline content is possible inside `deleted text`
var res = Markdown.DialectHelpers.inline_until_char.call( this, text.substr(1), "~" );
// Not bold
// Not deleted text
if ( !res ) return [ 1, "~" ];

@@ -239,2 +244,5 @@

// Ignore since there is whitespace before the closing `~`
var last_child = children[ children.length-1 ];
if ( typeof last_child === 'string' && last_child.substr(last_child.length - 2).match(/[\s\r\n]/) ) return [ 1, "~"];

@@ -241,0 +249,0 @@ return [consumed, ["del"].concat(children)]

{
"name": "tent-markdown",
"version": "0.1.1",
"version": "0.1.2",
"description": "Tent dialect for markdown lib",

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

@@ -66,3 +66,4 @@ // Adapted from https://github.com/evilstreak/markdown-js/blob/95f77476731793a2831184b2ebb935ce846b4bad/test/features.t.js

"links",
"links/autolink"
"links/autolink",
"strikethrough"
];

@@ -69,0 +70,0 @@

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