@readme/markdown 6.39.0 → 6.39.3
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/components/GlossaryItem.jsx +3 -3
- package/dist/main.js +16 -9
- package/dist/main.node.js +16 -9
- package/package.json +1 -1
|
@@ -5,13 +5,13 @@ const GlossaryContext = require('../contexts/GlossaryTerms');
|
|
|
5
5
|
|
|
6
6
|
// https://github.com/readmeio/api-explorer/blob/0dedafcf71102feedaa4145040d3f57d79d95752/packages/api-explorer/src/lib/replace-vars.js#L8
|
|
7
7
|
function GlossaryItem({ term, terms }) {
|
|
8
|
-
const foundTerm = terms.find(i => term === i.term);
|
|
8
|
+
const foundTerm = terms.find(i => term.toLowerCase() === i.term.toLowerCase());
|
|
9
9
|
|
|
10
|
-
if (!foundTerm) return
|
|
10
|
+
if (!foundTerm) return <span>{term}</span>;
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
13
|
<span className="glossary-tooltip" v={foundTerm.term}>
|
|
14
|
-
<span className="glossary-item highlight">{
|
|
14
|
+
<span className="glossary-item highlight">{term}</span>
|
|
15
15
|
<span className="tooltip-content">
|
|
16
16
|
<span className="tooltip-content-body">
|
|
17
17
|
<strong className="term">{foundTerm.term}</strong> - {foundTerm.definition}
|
package/dist/main.js
CHANGED
|
@@ -9646,15 +9646,15 @@ function GlossaryItem(_ref) {
|
|
|
9646
9646
|
var term = _ref.term,
|
|
9647
9647
|
terms = _ref.terms;
|
|
9648
9648
|
var foundTerm = terms.find(function (i) {
|
|
9649
|
-
return term === i.term;
|
|
9649
|
+
return term.toLowerCase() === i.term.toLowerCase();
|
|
9650
9650
|
});
|
|
9651
|
-
if (!foundTerm) return null;
|
|
9651
|
+
if (!foundTerm) return /*#__PURE__*/React.createElement("span", null, term);
|
|
9652
9652
|
return /*#__PURE__*/React.createElement("span", {
|
|
9653
9653
|
className: "glossary-tooltip",
|
|
9654
9654
|
v: foundTerm.term
|
|
9655
9655
|
}, /*#__PURE__*/React.createElement("span", {
|
|
9656
9656
|
className: "glossary-item highlight"
|
|
9657
|
-
},
|
|
9657
|
+
}, term), /*#__PURE__*/React.createElement("span", {
|
|
9658
9658
|
className: "tooltip-content"
|
|
9659
9659
|
}, /*#__PURE__*/React.createElement("span", {
|
|
9660
9660
|
className: "tooltip-content-body"
|
|
@@ -28277,9 +28277,10 @@ module.exports = function TableCompiler() {
|
|
|
28277
28277
|
}
|
|
28278
28278
|
|
|
28279
28279
|
var data = {
|
|
28280
|
-
|
|
28280
|
+
data: {},
|
|
28281
28281
|
cols: ((_node$children$ = node.children[0]) === null || _node$children$ === void 0 ? void 0 : (_node$children$$child = _node$children$.children) === null || _node$children$$child === void 0 ? void 0 : _node$children$$child.length) || 0,
|
|
28282
|
-
rows: node.children.length
|
|
28282
|
+
rows: node.children.length - 1,
|
|
28283
|
+
align: _toConsumableArray(node.align)
|
|
28283
28284
|
};
|
|
28284
28285
|
node.children.forEach(function (row, i) {
|
|
28285
28286
|
row.children.forEach(function (cell, j) {
|
|
@@ -28287,7 +28288,7 @@ module.exports = function TableCompiler() {
|
|
|
28287
28288
|
|
|
28288
28289
|
var string = _this.all(cell).join('').replace(/\\\n/g, ' \n');
|
|
28289
28290
|
|
|
28290
|
-
data["".concat(col, "-").concat(j)] = string;
|
|
28291
|
+
data.data["".concat(col, "-").concat(j)] = string;
|
|
28291
28292
|
});
|
|
28292
28293
|
});
|
|
28293
28294
|
return "[block:parameters]\n".concat(JSON.stringify(data, null, 2), "\n[/block]");
|
|
@@ -28315,7 +28316,7 @@ module.exports = function RdmeVarCompiler() {
|
|
|
28315
28316
|
|
|
28316
28317
|
var _slicedToArray = __webpack_require__(3038);
|
|
28317
28318
|
|
|
28318
|
-
var rgx = /^(
|
|
28319
|
+
var rgx = /^(#{1,6})(?!(?:#|\s))([^\n]+)\n/;
|
|
28319
28320
|
|
|
28320
28321
|
function tokenizer(eat, value) {
|
|
28321
28322
|
if (!rgx.test(value)) return true;
|
|
@@ -28326,8 +28327,14 @@ function tokenizer(eat, value) {
|
|
|
28326
28327
|
hash = _rgx$exec2[1],
|
|
28327
28328
|
text = _rgx$exec2[2];
|
|
28328
28329
|
|
|
28329
|
-
var
|
|
28330
|
-
|
|
28330
|
+
var now = eat.now();
|
|
28331
|
+
now.column += match.length;
|
|
28332
|
+
now.offset += match.length;
|
|
28333
|
+
return eat(match)({
|
|
28334
|
+
type: 'heading',
|
|
28335
|
+
depth: hash.length,
|
|
28336
|
+
children: this.tokenizeInline(text, now)
|
|
28337
|
+
});
|
|
28331
28338
|
}
|
|
28332
28339
|
|
|
28333
28340
|
function parser() {
|
package/dist/main.node.js
CHANGED
|
@@ -9646,15 +9646,15 @@ function GlossaryItem(_ref) {
|
|
|
9646
9646
|
var term = _ref.term,
|
|
9647
9647
|
terms = _ref.terms;
|
|
9648
9648
|
var foundTerm = terms.find(function (i) {
|
|
9649
|
-
return term === i.term;
|
|
9649
|
+
return term.toLowerCase() === i.term.toLowerCase();
|
|
9650
9650
|
});
|
|
9651
|
-
if (!foundTerm) return null;
|
|
9651
|
+
if (!foundTerm) return /*#__PURE__*/React.createElement("span", null, term);
|
|
9652
9652
|
return /*#__PURE__*/React.createElement("span", {
|
|
9653
9653
|
className: "glossary-tooltip",
|
|
9654
9654
|
v: foundTerm.term
|
|
9655
9655
|
}, /*#__PURE__*/React.createElement("span", {
|
|
9656
9656
|
className: "glossary-item highlight"
|
|
9657
|
-
},
|
|
9657
|
+
}, term), /*#__PURE__*/React.createElement("span", {
|
|
9658
9658
|
className: "tooltip-content"
|
|
9659
9659
|
}, /*#__PURE__*/React.createElement("span", {
|
|
9660
9660
|
className: "tooltip-content-body"
|
|
@@ -11100,9 +11100,10 @@ module.exports = function TableCompiler() {
|
|
|
11100
11100
|
}
|
|
11101
11101
|
|
|
11102
11102
|
var data = {
|
|
11103
|
-
|
|
11103
|
+
data: {},
|
|
11104
11104
|
cols: ((_node$children$ = node.children[0]) === null || _node$children$ === void 0 ? void 0 : (_node$children$$child = _node$children$.children) === null || _node$children$$child === void 0 ? void 0 : _node$children$$child.length) || 0,
|
|
11105
|
-
rows: node.children.length
|
|
11105
|
+
rows: node.children.length - 1,
|
|
11106
|
+
align: _toConsumableArray(node.align)
|
|
11106
11107
|
};
|
|
11107
11108
|
node.children.forEach(function (row, i) {
|
|
11108
11109
|
row.children.forEach(function (cell, j) {
|
|
@@ -11110,7 +11111,7 @@ module.exports = function TableCompiler() {
|
|
|
11110
11111
|
|
|
11111
11112
|
var string = _this.all(cell).join('').replace(/\\\n/g, ' \n');
|
|
11112
11113
|
|
|
11113
|
-
data["".concat(col, "-").concat(j)] = string;
|
|
11114
|
+
data.data["".concat(col, "-").concat(j)] = string;
|
|
11114
11115
|
});
|
|
11115
11116
|
});
|
|
11116
11117
|
return "[block:parameters]\n".concat(JSON.stringify(data, null, 2), "\n[/block]");
|
|
@@ -11138,7 +11139,7 @@ module.exports = function RdmeVarCompiler() {
|
|
|
11138
11139
|
|
|
11139
11140
|
var _slicedToArray = __webpack_require__(3038);
|
|
11140
11141
|
|
|
11141
|
-
var rgx = /^(
|
|
11142
|
+
var rgx = /^(#{1,6})(?!(?:#|\s))([^\n]+)\n/;
|
|
11142
11143
|
|
|
11143
11144
|
function tokenizer(eat, value) {
|
|
11144
11145
|
if (!rgx.test(value)) return true;
|
|
@@ -11149,8 +11150,14 @@ function tokenizer(eat, value) {
|
|
|
11149
11150
|
hash = _rgx$exec2[1],
|
|
11150
11151
|
text = _rgx$exec2[2];
|
|
11151
11152
|
|
|
11152
|
-
var
|
|
11153
|
-
|
|
11153
|
+
var now = eat.now();
|
|
11154
|
+
now.column += match.length;
|
|
11155
|
+
now.offset += match.length;
|
|
11156
|
+
return eat(match)({
|
|
11157
|
+
type: 'heading',
|
|
11158
|
+
depth: hash.length,
|
|
11159
|
+
children: this.tokenizeInline(text, now)
|
|
11160
|
+
});
|
|
11154
11161
|
}
|
|
11155
11162
|
|
|
11156
11163
|
function parser() {
|
package/package.json
CHANGED