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

remark-captions

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-captions - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

12

dist/index.js

@@ -14,3 +14,3 @@ 'use strict';

blockquote: 'Source:',
img: 'Figure:'
image: 'Figure:'
};

@@ -38,5 +38,7 @@

// legend can only be in a paragraph
var lastP = getLast(node.children);
if (!lastP || lastP.type !== 'paragraph') return;
// if the current node has some children, the legend is the last child.
// if not, the legend is the last child of the parent node.
var lastP = node.children ? getLast(node.children) : parent;
// legend can only be in a paragraph.
if (!lastP || node.children && lastP.type !== 'paragraph' || !node.children && parent.type !== 'paragraph') return;

@@ -50,3 +52,3 @@ // find which child contains the last legend

});
if (legendChildIndex === -1) return;
if (legendChildIndex === -1 || !node.children && legendChildIndex < index) return;

@@ -53,0 +55,0 @@ // split the text node containing the last legend and find the line containing it

{
"name": "remark-captions",
"version": "0.0.15",
"version": "0.0.16",
"repository": {

@@ -5,0 +5,0 @@ "url": "https://github.com/zestedesavoir/zmarkdown/tree/master/packages/remark-captions",

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