@readme/markdown 6.64.0 → 6.65.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 +5 -6
- package/dist/main.node.js +4 -5
- package/package.json +4 -7
package/dist/main.node.js
CHANGED
|
@@ -8958,10 +8958,7 @@ module.exports = function CodeTabsCompiler() {
|
|
|
8958
8958
|
var Compiler = this.Compiler;
|
|
8959
8959
|
var visitors = Compiler.prototype.visitors;
|
|
8960
8960
|
function compile(node) {
|
|
8961
|
-
|
|
8962
|
-
return node.children.map(function (code) {
|
|
8963
|
-
return "".concat(fence).concat(code.lang || '').concat(code.meta ? " ".concat(code.meta) : '', "\n").concat(code.value ? "".concat(code.value, "\n") : '').concat(fence);
|
|
8964
|
-
}).join('\n');
|
|
8961
|
+
return this.block(node).split('```\n\n').join('```\n');
|
|
8965
8962
|
}
|
|
8966
8963
|
visitors['code-tabs'] = compile;
|
|
8967
8964
|
};
|
|
@@ -9551,6 +9548,7 @@ var _inherits = __webpack_require__(1655);
|
|
|
9551
9548
|
var _setPrototypeOf = __webpack_require__(6015);
|
|
9552
9549
|
var _slicedToArray = __webpack_require__(7424);
|
|
9553
9550
|
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, void 0, groups); }; var _super = RegExp.prototype, _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype); } function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { var i = g[name]; if ("number" == typeof i) groups[name] = result[i];else { for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) { k++; } groups[name] = result[i[k]]; } return groups; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); return result && (result.groups = buildGroups(result, this)), result; }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if ("string" == typeof substitution) { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } if ("function" == typeof substitution) { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; return "object" != _typeof(args[args.length - 1]) && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args); }); } return _super[Symbol.replace].call(this, str, substitution); }, _wrapRegExp.apply(this, arguments); }
|
|
9551
|
+
var decode = __webpack_require__(7574);
|
|
9554
9552
|
function tokenizer(eat, value) {
|
|
9555
9553
|
// eslint-disable-next-line unicorn/no-unsafe-regex
|
|
9556
9554
|
var TAB_BLOCK_RGXP = /^(?:(?:^|\n)```(?:(?!\n```)[\s\S])*\n```[^\S\n]*){2,}/g;
|
|
@@ -9581,7 +9579,8 @@ function tokenizer(eat, value) {
|
|
|
9581
9579
|
meta = _codeBlock$groups$met === void 0 ? '' : _codeBlock$groups$met,
|
|
9582
9580
|
_codeBlock$groups$cod = _codeBlock$groups.code,
|
|
9583
9581
|
code = _codeBlock$groups$cod === void 0 ? '' : _codeBlock$groups$cod;
|
|
9584
|
-
|
|
9582
|
+
lang = lang ? decode(this.unescape(lang)) : lang;
|
|
9583
|
+
meta = decode(this.unescape(meta.trim()));
|
|
9585
9584
|
kids.push({
|
|
9586
9585
|
type: 'code',
|
|
9587
9586
|
className: 'tab-panel',
|
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.
|
|
5
|
+
"version": "6.65.1",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"browser": "dist/main.js",
|
|
8
8
|
"files": [
|
|
@@ -29,13 +29,14 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@readme/emojis": "^5.0.0",
|
|
32
|
-
"@readme/syntax-highlighter": "^12.1.
|
|
32
|
+
"@readme/syntax-highlighter": "^12.1.2",
|
|
33
33
|
"copy-to-clipboard": "^3.3.2",
|
|
34
34
|
"emoji-regex": "^10.2.1",
|
|
35
35
|
"hast-util-sanitize": "^4.0.0",
|
|
36
36
|
"lodash.escape": "^4.0.1",
|
|
37
37
|
"lodash.kebabcase": "^4.1.1",
|
|
38
38
|
"mdast-util-toc": "^5.1.0",
|
|
39
|
+
"parse-entities": "^2.0.0",
|
|
39
40
|
"path-browserify": "^1.0.1",
|
|
40
41
|
"process": "^0.11.10",
|
|
41
42
|
"prop-types": "^15.8.1",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"unist-util-visit": "^4.1.1"
|
|
59
60
|
},
|
|
60
61
|
"peerDependencies": {
|
|
61
|
-
"@readme/variable": "^15.1.
|
|
62
|
+
"@readme/variable": "^15.1.3",
|
|
62
63
|
"@tippyjs/react": "^4.1.0",
|
|
63
64
|
"react": "^16.14.0",
|
|
64
65
|
"react-dom": "^16.14.0"
|
|
@@ -78,12 +79,10 @@
|
|
|
78
79
|
"@hot-loader/react-dom": "^16.14.0",
|
|
79
80
|
"@readme/eslint-config": "^10.5.2",
|
|
80
81
|
"@readme/stylelint-config": "^3.2.0",
|
|
81
|
-
"@readme/variable": "^15.1.2",
|
|
82
82
|
"@semantic-release/changelog": "^6.0.1",
|
|
83
83
|
"@semantic-release/git": "^10.0.1",
|
|
84
84
|
"@testing-library/jest-dom": "^5.16.5",
|
|
85
85
|
"@testing-library/react": "^12.1.2",
|
|
86
|
-
"@tippyjs/react": "^4.2.6",
|
|
87
86
|
"babel-jest": "^29.2.1",
|
|
88
87
|
"babel-loader": "^8.2.5",
|
|
89
88
|
"codemirror": "^5.54.0",
|
|
@@ -102,8 +101,6 @@
|
|
|
102
101
|
"postcss": "^8.4.23",
|
|
103
102
|
"prettier": "^2.7.1",
|
|
104
103
|
"puppeteer": "^19.0.0",
|
|
105
|
-
"react": "^16.14.0",
|
|
106
|
-
"react-dom": "^16.14.0",
|
|
107
104
|
"react-hot-loader": "^4.13.0",
|
|
108
105
|
"regenerator-runtime": "^0.13.10",
|
|
109
106
|
"sass-loader": "^13.1.0",
|