@readme/markdown 6.82.0 → 6.82.1
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.
- package/dist/main.js +12 -1
- package/dist/main.node.js +12 -1
- package/package.json +2 -1
package/dist/main.js
CHANGED
|
@@ -8911,9 +8911,13 @@ function ReusableContentCompiler() {
|
|
|
8911
8911
|
}
|
|
8912
8912
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules
|
|
8913
8913
|
var toConsumableArray = __webpack_require__(5458);
|
|
8914
|
+
// EXTERNAL MODULE: ./node_modules/unist-util-visit/index.js
|
|
8915
|
+
var unist_util_visit = __webpack_require__(5118);
|
|
8914
8916
|
;// CONCATENATED MODULE: ./processor/compile/table.js
|
|
8915
8917
|
|
|
8916
8918
|
|
|
8919
|
+
|
|
8920
|
+
var FlowContent = ['blockquote', 'code', 'heading', 'html', 'list', 'thematicBreak', 'paragraph', 'definition'];
|
|
8917
8921
|
var find = function find(node, fn) {
|
|
8918
8922
|
if (fn(node)) return node;
|
|
8919
8923
|
if (node.children) return node.children.find(function (n) {
|
|
@@ -8929,9 +8933,16 @@ function TableCompiler() {
|
|
|
8929
8933
|
var _node$children$,
|
|
8930
8934
|
_node$children$$child,
|
|
8931
8935
|
_this = this;
|
|
8936
|
+
var hasMultipleBlocks = false;
|
|
8937
|
+
(0,unist_util_visit.visit)(node, function (childNode) {
|
|
8938
|
+
var _childNode$children, _childNode$children$f;
|
|
8939
|
+
if (((_childNode$children = childNode.children) === null || _childNode$children === void 0 ? void 0 : (_childNode$children$f = _childNode$children.filter(function (childChildNode) {
|
|
8940
|
+
return FlowContent.includes(childChildNode.type);
|
|
8941
|
+
})) === null || _childNode$children$f === void 0 ? void 0 : _childNode$children$f.length) > 1) hasMultipleBlocks = true;
|
|
8942
|
+
});
|
|
8932
8943
|
if (!find(node, function (n) {
|
|
8933
8944
|
return n.type === 'break';
|
|
8934
|
-
})) {
|
|
8945
|
+
}) && !hasMultipleBlocks) {
|
|
8935
8946
|
return original.call(this, node);
|
|
8936
8947
|
}
|
|
8937
8948
|
var data = {
|
package/dist/main.node.js
CHANGED
|
@@ -9283,9 +9283,13 @@ function ReusableContentCompiler() {
|
|
|
9283
9283
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
|
|
9284
9284
|
var toConsumableArray = __webpack_require__(1132);
|
|
9285
9285
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
9286
|
+
// EXTERNAL MODULE: ./node_modules/unist-util-visit/index.js
|
|
9287
|
+
var unist_util_visit = __webpack_require__(5118);
|
|
9286
9288
|
;// CONCATENATED MODULE: ./processor/compile/table.js
|
|
9287
9289
|
|
|
9288
9290
|
|
|
9291
|
+
|
|
9292
|
+
var FlowContent = ['blockquote', 'code', 'heading', 'html', 'list', 'thematicBreak', 'paragraph', 'definition'];
|
|
9289
9293
|
var find = function find(node, fn) {
|
|
9290
9294
|
if (fn(node)) return node;
|
|
9291
9295
|
if (node.children) return node.children.find(function (n) {
|
|
@@ -9301,9 +9305,16 @@ function TableCompiler() {
|
|
|
9301
9305
|
var _node$children$,
|
|
9302
9306
|
_node$children$$child,
|
|
9303
9307
|
_this = this;
|
|
9308
|
+
var hasMultipleBlocks = false;
|
|
9309
|
+
(0,unist_util_visit.visit)(node, function (childNode) {
|
|
9310
|
+
var _childNode$children, _childNode$children$f;
|
|
9311
|
+
if (((_childNode$children = childNode.children) === null || _childNode$children === void 0 ? void 0 : (_childNode$children$f = _childNode$children.filter(function (childChildNode) {
|
|
9312
|
+
return FlowContent.includes(childChildNode.type);
|
|
9313
|
+
})) === null || _childNode$children$f === void 0 ? void 0 : _childNode$children$f.length) > 1) hasMultipleBlocks = true;
|
|
9314
|
+
});
|
|
9304
9315
|
if (!find(node, function (n) {
|
|
9305
9316
|
return n.type === 'break';
|
|
9306
|
-
})) {
|
|
9317
|
+
}) && !hasMultipleBlocks) {
|
|
9307
9318
|
return original.call(this, node);
|
|
9308
9319
|
}
|
|
9309
9320
|
var data = {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@readme/markdown",
|
|
3
3
|
"description": "ReadMe's React-based Markdown parser",
|
|
4
4
|
"author": "Rafe Goldberg <rafe@readme.io>",
|
|
5
|
-
"version": "6.82.
|
|
5
|
+
"version": "6.82.1",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"browser": "dist/main.js",
|
|
8
8
|
"files": [
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"node-sass": "^9.0.0",
|
|
98
98
|
"postcss": "^8.4.35",
|
|
99
99
|
"prettier": "^3.2.5",
|
|
100
|
+
"prettier-2": "npm:prettier@^2.8.8",
|
|
100
101
|
"puppeteer": "^22.4.0",
|
|
101
102
|
"regenerator-runtime": "^0.14.1",
|
|
102
103
|
"sass-loader": "^14.1.1",
|