@shelf/table-of-contents 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,9 @@ var getDataWithoutNestedAnchors = exports.getDataWithoutNestedAnchors = function
37
37
  contentArray.forEach(function (node) {
38
38
  firstAnchorElement === null || firstAnchorElement === void 0 ? void 0 : firstAnchorElement.removeChild(node);
39
39
  });
40
+ if (firstAnchorElement) {
41
+ firstAnchorElement.innerHTML = '<wbr/>';
42
+ }
40
43
  var newContentArray = [firstAnchorElement].concat(contentArray);
41
44
  parentNode === null || parentNode === void 0 ? void 0 : parentNode.replaceChildren.apply(parentNode, _toConsumableArray(newContentArray));
42
45
  return (parentNode === null || parentNode === void 0 ? void 0 : parentNode.outerHTML) || results;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shelf/table-of-contents",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Fork of node-toc to reduce bundle size & rewritten in TypeScript",
5
5
  "license": "MIT",
6
6
  "author": {