remark-captions
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -57,10 +57,10 @@ 'use strict'; | ||
} | ||
} | ||
}); | ||
// the child containing the last legend is split in two: head contains text until | ||
// legend, tail contains legend text | ||
);var tail = clone(lastP.children[legendChildIndex]); | ||
var headText = potentialLegendLines.slice(0, lastLegendIndex).join('\n' | ||
var tail = clone(lastP.children[legendChildIndex]); | ||
var headText = potentialLegendLines.slice(0, lastLegendIndex).join('\n'); | ||
// replace existing node 'head' content with text until legend | ||
);lastP.children[legendChildIndex].value = headText; | ||
lastP.children[legendChildIndex].value = headText; | ||
@@ -72,8 +72,8 @@ // legend text is put into the cloned node… | ||
// … and 'tail', the cloned node is inserted after 'head' | ||
lastP.children.splice(legendChildIndex + 1, 0, tail | ||
lastP.children.splice(legendChildIndex + 1, 0, tail); | ||
// gather all nodes that should be inside the legend | ||
);var legendNodes = lastP.children.slice(legendChildIndex + 1 | ||
var legendNodes = lastP.children.slice(legendChildIndex + 1); | ||
// remove them from the parent paragraph | ||
);lastP.children = lastP.children.slice(0, legendChildIndex + 1); | ||
lastP.children = lastP.children.slice(0, legendChildIndex + 1); | ||
@@ -118,4 +118,4 @@ var figcaption = { | ||
type: 'text', | ||
value: firstTextLine.trimLeft // remove the " " after the {prefix}: | ||
() }); | ||
value: firstTextLine.trimLeft() // remove the " " after the {prefix}: | ||
}); | ||
@@ -122,0 +122,0 @@ legendNode.children.forEach(function (node, index) { |
{ | ||
"name": "remark-captions", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "url": "https://github.com/zestedesavoir/zmarkdown/tree/master/packages/remark-captions", |
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
8963