@readme/markdown 6.69.0 → 6.70.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 +24 -18
- package/dist/main.node.js +24 -18
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -8505,6 +8505,7 @@ var options = {
|
|
|
8505
8505
|
spacedTable: true,
|
|
8506
8506
|
paddedTable: true
|
|
8507
8507
|
},
|
|
8508
|
+
normalize: true,
|
|
8508
8509
|
lazyImages: true,
|
|
8509
8510
|
reusableContent: {},
|
|
8510
8511
|
safeMode: false,
|
|
@@ -8718,8 +8719,8 @@ var break_default = /*#__PURE__*/__webpack_require__.n(compile_break);
|
|
|
8718
8719
|
var code_tabs = __webpack_require__(4079);
|
|
8719
8720
|
var code_tabs_default = /*#__PURE__*/__webpack_require__.n(code_tabs);
|
|
8720
8721
|
;// CONCATENATED MODULE: ./processor/compile/magic-block.js
|
|
8721
|
-
var magicBlock = function magicBlock(type, data) {
|
|
8722
|
-
return "[block:".concat(type, "]").concat(JSON.stringify(data), "[/block]");
|
|
8722
|
+
var magicBlock = function magicBlock(type, data, parent) {
|
|
8723
|
+
return parent.type === 'root' ? "[block:".concat(type, "]\n").concat(JSON.stringify(data, null, 2), "\n[/block]\n") : "[block:".concat(type, "]").concat(JSON.stringify(data), "[/block]");
|
|
8723
8724
|
};
|
|
8724
8725
|
/* harmony default export */ const magic_block = (magicBlock);
|
|
8725
8726
|
;// CONCATENATED MODULE: ./processor/compile/div.js
|
|
@@ -8727,9 +8728,9 @@ var magicBlock = function magicBlock(type, data) {
|
|
|
8727
8728
|
function DivCompiler() {
|
|
8728
8729
|
var Compiler = this.Compiler;
|
|
8729
8730
|
var visitors = Compiler.prototype.visitors;
|
|
8730
|
-
visitors.div = function compile(node) {
|
|
8731
|
+
visitors.div = function compile(node, parent) {
|
|
8731
8732
|
var data = node.data.hProperties;
|
|
8732
|
-
return magic_block(node.data.hName, data);
|
|
8733
|
+
return magic_block(node.data.hName, data, parent);
|
|
8733
8734
|
};
|
|
8734
8735
|
}
|
|
8735
8736
|
// EXTERNAL MODULE: ./processor/compile/escape.js
|
|
@@ -8767,7 +8768,7 @@ var compileImage = function compileImage(image) {
|
|
|
8767
8768
|
function FigureCompiler() {
|
|
8768
8769
|
var Compiler = this.Compiler;
|
|
8769
8770
|
var visitors = Compiler.prototype.visitors;
|
|
8770
|
-
visitors.figure = function figureCompiler(node) {
|
|
8771
|
+
visitors.figure = function figureCompiler(node, parent) {
|
|
8771
8772
|
var image;
|
|
8772
8773
|
var caption;
|
|
8773
8774
|
if (node.children) {
|
|
@@ -8782,7 +8783,7 @@ function FigureCompiler() {
|
|
|
8782
8783
|
var block = {
|
|
8783
8784
|
images: [img]
|
|
8784
8785
|
};
|
|
8785
|
-
return magic_block('image', block);
|
|
8786
|
+
return magic_block('image', block, parent);
|
|
8786
8787
|
};
|
|
8787
8788
|
}
|
|
8788
8789
|
;// CONCATENATED MODULE: ./processor/compile/html-block.js
|
|
@@ -8790,11 +8791,11 @@ function FigureCompiler() {
|
|
|
8790
8791
|
function HtmlBlockCompiler() {
|
|
8791
8792
|
var Compiler = this.Compiler;
|
|
8792
8793
|
var visitors = Compiler.prototype.visitors;
|
|
8793
|
-
visitors['html-block'] = function (node) {
|
|
8794
|
+
visitors['html-block'] = function (node, parent) {
|
|
8794
8795
|
var html = node.data.hProperties.html;
|
|
8795
8796
|
return magic_block('html', {
|
|
8796
8797
|
html: html
|
|
8797
|
-
});
|
|
8798
|
+
}, parent);
|
|
8798
8799
|
};
|
|
8799
8800
|
}
|
|
8800
8801
|
// EXTERNAL MODULE: ./processor/compile/i.js
|
|
@@ -8811,14 +8812,14 @@ var callout_default = /*#__PURE__*/__webpack_require__.n(callout);
|
|
|
8811
8812
|
function embed_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8812
8813
|
function embed_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? embed_ownKeys(Object(source), !0).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : embed_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8813
8814
|
|
|
8814
|
-
function EmbedCompiler(node) {
|
|
8815
|
+
function EmbedCompiler(node, parent) {
|
|
8815
8816
|
var data = node.data.hProperties;
|
|
8816
8817
|
var _data$provider = data.provider,
|
|
8817
8818
|
provider = _data$provider === void 0 ? 'embed' : _data$provider;
|
|
8818
8819
|
provider = provider.replace(/^@/, '');
|
|
8819
8820
|
return magic_block('embed', embed_objectSpread(embed_objectSpread({}, data), {}, {
|
|
8820
8821
|
provider: provider
|
|
8821
|
-
}));
|
|
8822
|
+
}), parent);
|
|
8822
8823
|
}
|
|
8823
8824
|
function EmbedCompilerPlugin() {
|
|
8824
8825
|
var Compiler = this.Compiler;
|
|
@@ -8842,7 +8843,7 @@ function ReusableContentCompiler() {
|
|
|
8842
8843
|
var Compiler = this.Compiler;
|
|
8843
8844
|
var visitors = Compiler.prototype.visitors;
|
|
8844
8845
|
visitors[reusable_content/* type */.dt] = function (node) {
|
|
8845
|
-
return "<".concat(reusable_content/* tag */._q, "
|
|
8846
|
+
return "<".concat(reusable_content/* tag */._q, " slug=\"").concat(node.slug, "\" />");
|
|
8846
8847
|
};
|
|
8847
8848
|
}
|
|
8848
8849
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules
|
|
@@ -8861,7 +8862,7 @@ function TableCompiler() {
|
|
|
8861
8862
|
var Compiler = this.Compiler;
|
|
8862
8863
|
var visitors = Compiler.prototype.visitors;
|
|
8863
8864
|
var original = visitors.table;
|
|
8864
|
-
visitors.table = function (node) {
|
|
8865
|
+
visitors.table = function (node, parent) {
|
|
8865
8866
|
var _node$children$,
|
|
8866
8867
|
_node$children$$child,
|
|
8867
8868
|
_this = this;
|
|
@@ -8883,7 +8884,7 @@ function TableCompiler() {
|
|
|
8883
8884
|
data.data["".concat(col, "-").concat(j)] = string;
|
|
8884
8885
|
});
|
|
8885
8886
|
});
|
|
8886
|
-
return magic_block('parameters', data);
|
|
8887
|
+
return magic_block('parameters', data, parent);
|
|
8887
8888
|
};
|
|
8888
8889
|
}
|
|
8889
8890
|
// EXTERNAL MODULE: ./processor/compile/table-head.js
|
|
@@ -10224,18 +10225,18 @@ var rehypeTransformers = [table_cell_inline_code];
|
|
|
10224
10225
|
|
|
10225
10226
|
var type = 'reusable-content';
|
|
10226
10227
|
var tag = 'RMReusableContent';
|
|
10227
|
-
var regexp = new RegExp("^\\s*<".concat(tag, "
|
|
10228
|
+
var regexp = new RegExp("^\\s*<".concat(tag, " slug=\"(?<slug>.*)\" />\\s*$"));
|
|
10228
10229
|
var reusableContentTransformer = function reusableContentTransformer() {
|
|
10229
10230
|
var reusableContent = this.data('reusableContent');
|
|
10230
10231
|
return function (tree) {
|
|
10231
10232
|
(0,unist_util_visit__WEBPACK_IMPORTED_MODULE_0__/* .visit */ .Vn)(tree, 'html', function (node, index, parent) {
|
|
10232
10233
|
var result = regexp.exec(node.value);
|
|
10233
|
-
if (!result || !result.groups.
|
|
10234
|
-
var
|
|
10234
|
+
if (!result || !result.groups.slug) return;
|
|
10235
|
+
var slug = result.groups.slug;
|
|
10235
10236
|
var block = {
|
|
10236
10237
|
type: type,
|
|
10237
|
-
|
|
10238
|
-
children:
|
|
10238
|
+
slug: slug,
|
|
10239
|
+
children: slug in reusableContent ? reusableContent[slug] : []
|
|
10239
10240
|
};
|
|
10240
10241
|
parent.children[index] = block;
|
|
10241
10242
|
});
|
|
@@ -34697,6 +34698,11 @@ function setup(blocks) {
|
|
|
34697
34698
|
return Component.sanitize && Component.sanitize(opts.sanitize);
|
|
34698
34699
|
});
|
|
34699
34700
|
}
|
|
34701
|
+
|
|
34702
|
+
// normalize magic block linebreaks
|
|
34703
|
+
if (opts.normalize && blocks) {
|
|
34704
|
+
blocks = blocks.replace(/^\[block:/gm, '\n[block:').replace(/^\[\/block\]/gm, '[/block]\n');
|
|
34705
|
+
}
|
|
34700
34706
|
return ["".concat(blocks, "\n\n "), opts];
|
|
34701
34707
|
}
|
|
34702
34708
|
var utils = {
|
package/dist/main.node.js
CHANGED
|
@@ -8873,6 +8873,7 @@ var options = {
|
|
|
8873
8873
|
spacedTable: true,
|
|
8874
8874
|
paddedTable: true
|
|
8875
8875
|
},
|
|
8876
|
+
normalize: true,
|
|
8876
8877
|
lazyImages: true,
|
|
8877
8878
|
reusableContent: {},
|
|
8878
8879
|
safeMode: false,
|
|
@@ -9086,8 +9087,8 @@ var break_default = /*#__PURE__*/__webpack_require__.n(compile_break);
|
|
|
9086
9087
|
var code_tabs = __webpack_require__(4079);
|
|
9087
9088
|
var code_tabs_default = /*#__PURE__*/__webpack_require__.n(code_tabs);
|
|
9088
9089
|
;// CONCATENATED MODULE: ./processor/compile/magic-block.js
|
|
9089
|
-
var magicBlock = function magicBlock(type, data) {
|
|
9090
|
-
return "[block:".concat(type, "]").concat(JSON.stringify(data), "[/block]");
|
|
9090
|
+
var magicBlock = function magicBlock(type, data, parent) {
|
|
9091
|
+
return parent.type === 'root' ? "[block:".concat(type, "]\n").concat(JSON.stringify(data, null, 2), "\n[/block]\n") : "[block:".concat(type, "]").concat(JSON.stringify(data), "[/block]");
|
|
9091
9092
|
};
|
|
9092
9093
|
/* harmony default export */ const magic_block = (magicBlock);
|
|
9093
9094
|
;// CONCATENATED MODULE: ./processor/compile/div.js
|
|
@@ -9095,9 +9096,9 @@ var magicBlock = function magicBlock(type, data) {
|
|
|
9095
9096
|
function DivCompiler() {
|
|
9096
9097
|
var Compiler = this.Compiler;
|
|
9097
9098
|
var visitors = Compiler.prototype.visitors;
|
|
9098
|
-
visitors.div = function compile(node) {
|
|
9099
|
+
visitors.div = function compile(node, parent) {
|
|
9099
9100
|
var data = node.data.hProperties;
|
|
9100
|
-
return magic_block(node.data.hName, data);
|
|
9101
|
+
return magic_block(node.data.hName, data, parent);
|
|
9101
9102
|
};
|
|
9102
9103
|
}
|
|
9103
9104
|
// EXTERNAL MODULE: ./processor/compile/escape.js
|
|
@@ -9137,7 +9138,7 @@ var compileImage = function compileImage(image) {
|
|
|
9137
9138
|
function FigureCompiler() {
|
|
9138
9139
|
var Compiler = this.Compiler;
|
|
9139
9140
|
var visitors = Compiler.prototype.visitors;
|
|
9140
|
-
visitors.figure = function figureCompiler(node) {
|
|
9141
|
+
visitors.figure = function figureCompiler(node, parent) {
|
|
9141
9142
|
var image;
|
|
9142
9143
|
var caption;
|
|
9143
9144
|
if (node.children) {
|
|
@@ -9152,7 +9153,7 @@ function FigureCompiler() {
|
|
|
9152
9153
|
var block = {
|
|
9153
9154
|
images: [img]
|
|
9154
9155
|
};
|
|
9155
|
-
return magic_block('image', block);
|
|
9156
|
+
return magic_block('image', block, parent);
|
|
9156
9157
|
};
|
|
9157
9158
|
}
|
|
9158
9159
|
;// CONCATENATED MODULE: ./processor/compile/html-block.js
|
|
@@ -9160,11 +9161,11 @@ function FigureCompiler() {
|
|
|
9160
9161
|
function HtmlBlockCompiler() {
|
|
9161
9162
|
var Compiler = this.Compiler;
|
|
9162
9163
|
var visitors = Compiler.prototype.visitors;
|
|
9163
|
-
visitors['html-block'] = function (node) {
|
|
9164
|
+
visitors['html-block'] = function (node, parent) {
|
|
9164
9165
|
var html = node.data.hProperties.html;
|
|
9165
9166
|
return magic_block('html', {
|
|
9166
9167
|
html: html
|
|
9167
|
-
});
|
|
9168
|
+
}, parent);
|
|
9168
9169
|
};
|
|
9169
9170
|
}
|
|
9170
9171
|
// EXTERNAL MODULE: ./processor/compile/i.js
|
|
@@ -9181,14 +9182,14 @@ var callout_default = /*#__PURE__*/__webpack_require__.n(callout);
|
|
|
9181
9182
|
function embed_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9182
9183
|
function embed_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? embed_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : embed_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9183
9184
|
|
|
9184
|
-
function EmbedCompiler(node) {
|
|
9185
|
+
function EmbedCompiler(node, parent) {
|
|
9185
9186
|
var data = node.data.hProperties;
|
|
9186
9187
|
var _data$provider = data.provider,
|
|
9187
9188
|
provider = _data$provider === void 0 ? 'embed' : _data$provider;
|
|
9188
9189
|
provider = provider.replace(/^@/, '');
|
|
9189
9190
|
return magic_block('embed', embed_objectSpread(embed_objectSpread({}, data), {}, {
|
|
9190
9191
|
provider: provider
|
|
9191
|
-
}));
|
|
9192
|
+
}), parent);
|
|
9192
9193
|
}
|
|
9193
9194
|
function EmbedCompilerPlugin() {
|
|
9194
9195
|
var Compiler = this.Compiler;
|
|
@@ -9212,7 +9213,7 @@ function ReusableContentCompiler() {
|
|
|
9212
9213
|
var Compiler = this.Compiler;
|
|
9213
9214
|
var visitors = Compiler.prototype.visitors;
|
|
9214
9215
|
visitors[reusable_content/* type */.dt] = function (node) {
|
|
9215
|
-
return "<".concat(reusable_content/* tag */._q, "
|
|
9216
|
+
return "<".concat(reusable_content/* tag */._q, " slug=\"").concat(node.slug, "\" />");
|
|
9216
9217
|
};
|
|
9217
9218
|
}
|
|
9218
9219
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
|
|
@@ -9232,7 +9233,7 @@ function TableCompiler() {
|
|
|
9232
9233
|
var Compiler = this.Compiler;
|
|
9233
9234
|
var visitors = Compiler.prototype.visitors;
|
|
9234
9235
|
var original = visitors.table;
|
|
9235
|
-
visitors.table = function (node) {
|
|
9236
|
+
visitors.table = function (node, parent) {
|
|
9236
9237
|
var _node$children$,
|
|
9237
9238
|
_node$children$$child,
|
|
9238
9239
|
_this = this;
|
|
@@ -9254,7 +9255,7 @@ function TableCompiler() {
|
|
|
9254
9255
|
data.data["".concat(col, "-").concat(j)] = string;
|
|
9255
9256
|
});
|
|
9256
9257
|
});
|
|
9257
|
-
return magic_block('parameters', data);
|
|
9258
|
+
return magic_block('parameters', data, parent);
|
|
9258
9259
|
};
|
|
9259
9260
|
}
|
|
9260
9261
|
// EXTERNAL MODULE: ./processor/compile/table-head.js
|
|
@@ -10599,18 +10600,18 @@ var rehypeTransformers = [table_cell_inline_code];
|
|
|
10599
10600
|
|
|
10600
10601
|
var type = 'reusable-content';
|
|
10601
10602
|
var tag = 'RMReusableContent';
|
|
10602
|
-
var regexp = new RegExp("^\\s*<".concat(tag, "
|
|
10603
|
+
var regexp = new RegExp("^\\s*<".concat(tag, " slug=\"(?<slug>.*)\" />\\s*$"));
|
|
10603
10604
|
var reusableContentTransformer = function reusableContentTransformer() {
|
|
10604
10605
|
var reusableContent = this.data('reusableContent');
|
|
10605
10606
|
return function (tree) {
|
|
10606
10607
|
(0,unist_util_visit__WEBPACK_IMPORTED_MODULE_0__/* .visit */ .Vn)(tree, 'html', function (node, index, parent) {
|
|
10607
10608
|
var result = regexp.exec(node.value);
|
|
10608
|
-
if (!result || !result.groups.
|
|
10609
|
-
var
|
|
10609
|
+
if (!result || !result.groups.slug) return;
|
|
10610
|
+
var slug = result.groups.slug;
|
|
10610
10611
|
var block = {
|
|
10611
10612
|
type: type,
|
|
10612
|
-
|
|
10613
|
-
children:
|
|
10613
|
+
slug: slug,
|
|
10614
|
+
children: slug in reusableContent ? reusableContent[slug] : []
|
|
10614
10615
|
};
|
|
10615
10616
|
parent.children[index] = block;
|
|
10616
10617
|
});
|
|
@@ -34471,6 +34472,11 @@ function setup(blocks) {
|
|
|
34471
34472
|
return Component.sanitize && Component.sanitize(opts.sanitize);
|
|
34472
34473
|
});
|
|
34473
34474
|
}
|
|
34475
|
+
|
|
34476
|
+
// normalize magic block linebreaks
|
|
34477
|
+
if (opts.normalize && blocks) {
|
|
34478
|
+
blocks = blocks.replace(/^\[block:/gm, '\n[block:').replace(/^\[\/block\]/gm, '[/block]\n');
|
|
34479
|
+
}
|
|
34474
34480
|
return ["".concat(blocks, "\n\n "), opts];
|
|
34475
34481
|
}
|
|
34476
34482
|
var utils = {
|
package/package.json
CHANGED