@readme/markdown 6.55.1 → 6.56.0

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.
@@ -17,7 +17,7 @@ class Embed extends React.Component {
17
17
  }
18
18
 
19
19
  if ('iframe' in this.props) {
20
- return <iframe {...attrs} border="none" src={url} style={{ border: 'none' }} />;
20
+ return <iframe {...attrs} border="none" src={url} style={{ border: 'none', display: 'flex', margin: 'auto' }} />;
21
21
  }
22
22
 
23
23
  const classes = ['embed', image && 'embed_hasImg'];
package/dist/main.js CHANGED
@@ -8354,7 +8354,9 @@ var Embed = /*#__PURE__*/function (_React$Component) {
8354
8354
  border: "none",
8355
8355
  src: url,
8356
8356
  style: {
8357
- border: 'none'
8357
+ border: 'none',
8358
+ display: 'flex',
8359
+ margin: 'auto'
8358
8360
  }
8359
8361
  }));
8360
8362
  }
@@ -25165,7 +25167,7 @@ module.exports.sanitize = function (sanitizeSchema) {
25165
25167
 
25166
25168
  /***/ }),
25167
25169
 
25168
- /***/ 8160:
25170
+ /***/ 6284:
25169
25171
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25170
25172
 
25171
25173
  "use strict";
@@ -25179,8 +25181,33 @@ __webpack_require__.d(__webpack_exports__, {
25179
25181
  "sanitize": () => (/* binding */ sanitize)
25180
25182
  });
25181
25183
 
25182
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 5 modules
25183
- var slicedToArray = __webpack_require__(8152);
25184
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
25185
+ var arrayLikeToArray = __webpack_require__(907);
25186
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
25187
+
25188
+ function _arrayWithoutHoles(arr) {
25189
+ if (Array.isArray(arr)) return (0,arrayLikeToArray/* default */.Z)(arr);
25190
+ }
25191
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
25192
+ function _iterableToArray(iter) {
25193
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
25194
+ }
25195
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
25196
+ var unsupportedIterableToArray = __webpack_require__(181);
25197
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
25198
+ function _nonIterableSpread() {
25199
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25200
+ }
25201
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
25202
+
25203
+
25204
+
25205
+
25206
+ function _toConsumableArray(arr) {
25207
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || (0,unsupportedIterableToArray/* default */.Z)(arr) || _nonIterableSpread();
25208
+ }
25209
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
25210
+ var slicedToArray = __webpack_require__(1037);
25184
25211
  ;// CONCATENATED MODULE: ./node_modules/emoji-regex/index.mjs
25185
25212
  /* harmony default export */ const emoji_regex = (() => {
25186
25213
  // https://mths.be/emoji
@@ -25195,6 +25222,7 @@ var trim = __webpack_require__(2745);
25195
25222
  var trim_default = /*#__PURE__*/__webpack_require__.n(trim);
25196
25223
  ;// CONCATENATED MODULE: ./processor/parse/flavored/callout.js
25197
25224
 
25225
+
25198
25226
  /* eslint-disable no-plusplus */
25199
25227
  /* eslint-disable consistent-return */
25200
25228
 
@@ -25249,7 +25277,6 @@ function blockquoteReadme(eat, value, silent) {
25249
25277
  var line;
25250
25278
  var startIndex;
25251
25279
  var prefixed;
25252
- var icon;
25253
25280
  while (index < length) {
25254
25281
  character = value.charAt(index);
25255
25282
  if (character !== space && character !== tab) {
@@ -25313,19 +25340,13 @@ function blockquoteReadme(eat, value, silent) {
25313
25340
  offsets[currentLine] = (offsets[currentLine] || 0) + indents[index];
25314
25341
  currentLine++;
25315
25342
  }
25316
- var match;
25317
- var title;
25318
- var body;
25319
- if (match = contents[0].match(regex)) {
25320
- icon = match[1];
25321
- contents[0] = contents[0].slice(match[0].length);
25322
- title = trim_default()(contents[0]);
25323
- body = trim_default()(contents.slice(1).join(lineFeed));
25324
- }
25325
- var exit = self.enterBlock();
25326
- contents = self.tokenizeBlock(contents.join(lineFeed), now);
25327
- exit();
25343
+ var _ref3 = contents[0].match(regex) || [],
25344
+ _ref4 = (0,slicedToArray/* default */.Z)(_ref3, 2),
25345
+ match = _ref4[0],
25346
+ icon = _ref4[1];
25328
25347
  if (icon) {
25348
+ var title = trim_default()(contents[0].slice(match.length));
25349
+ var body = trim_default()(contents.slice(1).join(lineFeed));
25329
25350
  var data = {
25330
25351
  hName: 'rdme-callout',
25331
25352
  hProperties: {
@@ -25335,15 +25356,21 @@ function blockquoteReadme(eat, value, silent) {
25335
25356
  theme: themes[icon] || 'default'
25336
25357
  }
25337
25358
  };
25359
+ var _exit = self.enterBlock();
25360
+ var _children = [].concat(_toConsumableArray(self.tokenizeBlock(title, now)), _toConsumableArray(self.tokenizeBlock(body, now)));
25361
+ _exit();
25338
25362
  return add({
25339
25363
  type: 'rdme-callout',
25340
- children: contents,
25364
+ children: _children,
25341
25365
  data: data
25342
25366
  });
25343
25367
  }
25368
+ var exit = self.enterBlock();
25369
+ var children = self.tokenizeBlock(contents.join(lineFeed), now);
25370
+ exit();
25344
25371
  return add({
25345
25372
  type: 'blockquote',
25346
- children: contents
25373
+ children: children
25347
25374
  });
25348
25375
  }
25349
25376
  function parser() {
@@ -25593,8 +25620,8 @@ var magic_block_parser_default = /*#__PURE__*/__webpack_require__.n(magic_block_
25593
25620
  // EXTERNAL MODULE: ./processor/parse/flavored/code-tabs.js
25594
25621
  var code_tabs = __webpack_require__(5289);
25595
25622
  var code_tabs_default = /*#__PURE__*/__webpack_require__.n(code_tabs);
25596
- // EXTERNAL MODULE: ./processor/parse/flavored/callout.js + 1 modules
25597
- var callout = __webpack_require__(8160);
25623
+ // EXTERNAL MODULE: ./processor/parse/flavored/callout.js + 5 modules
25624
+ var callout = __webpack_require__(6284);
25598
25625
  // EXTERNAL MODULE: ./processor/parse/flavored/embed.js
25599
25626
  var flavored_embed = __webpack_require__(1559);
25600
25627
  var embed_default = /*#__PURE__*/__webpack_require__.n(flavored_embed);
@@ -46852,6 +46879,25 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__4466__;
46852
46879
 
46853
46880
  /***/ }),
46854
46881
 
46882
+ /***/ 907:
46883
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
46884
+
46885
+ "use strict";
46886
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
46887
+ /* harmony export */ "Z": () => (/* binding */ _arrayLikeToArray)
46888
+ /* harmony export */ });
46889
+ function _arrayLikeToArray(arr, len) {
46890
+ if (len == null || len > arr.length) len = arr.length;
46891
+
46892
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
46893
+ arr2[i] = arr[i];
46894
+ }
46895
+
46896
+ return arr2;
46897
+ }
46898
+
46899
+ /***/ }),
46900
+
46855
46901
  /***/ 4942:
46856
46902
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
46857
46903
 
@@ -46876,7 +46922,7 @@ function _defineProperty(obj, key, value) {
46876
46922
 
46877
46923
  /***/ }),
46878
46924
 
46879
- /***/ 8152:
46925
+ /***/ 1037:
46880
46926
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
46881
46927
 
46882
46928
  "use strict";
@@ -46920,26 +46966,8 @@ function _iterableToArrayLimit(arr, i) {
46920
46966
 
46921
46967
  return _arr;
46922
46968
  }
46923
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
46924
- function _arrayLikeToArray(arr, len) {
46925
- if (len == null || len > arr.length) len = arr.length;
46926
-
46927
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
46928
- arr2[i] = arr[i];
46929
- }
46930
-
46931
- return arr2;
46932
- }
46933
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
46934
-
46935
- function _unsupportedIterableToArray(o, minLen) {
46936
- if (!o) return;
46937
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
46938
- var n = Object.prototype.toString.call(o).slice(8, -1);
46939
- if (n === "Object" && o.constructor) n = o.constructor.name;
46940
- if (n === "Map" || n === "Set") return Array.from(o);
46941
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
46942
- }
46969
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
46970
+ var unsupportedIterableToArray = __webpack_require__(181);
46943
46971
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
46944
46972
  function _nonIterableRest() {
46945
46973
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
@@ -46950,7 +46978,27 @@ function _nonIterableRest() {
46950
46978
 
46951
46979
 
46952
46980
  function _slicedToArray(arr, i) {
46953
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
46981
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || (0,unsupportedIterableToArray/* default */.Z)(arr, i) || _nonIterableRest();
46982
+ }
46983
+
46984
+ /***/ }),
46985
+
46986
+ /***/ 181:
46987
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
46988
+
46989
+ "use strict";
46990
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
46991
+ /* harmony export */ "Z": () => (/* binding */ _unsupportedIterableToArray)
46992
+ /* harmony export */ });
46993
+ /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(907);
46994
+
46995
+ function _unsupportedIterableToArray(o, minLen) {
46996
+ if (!o) return;
46997
+ if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(o, minLen);
46998
+ var n = Object.prototype.toString.call(o).slice(8, -1);
46999
+ if (n === "Object" && o.constructor) n = o.constructor.name;
47000
+ if (n === "Map" || n === "Set") return Array.from(o);
47001
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(o, minLen);
46954
47002
  }
46955
47003
 
46956
47004
  /***/ }),
@@ -48852,7 +48900,7 @@ __webpack_require__.r(__webpack_exports__);
48852
48900
  /* harmony export */ "utils": () => (/* binding */ utils)
48853
48901
  /* harmony export */ });
48854
48902
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4942);
48855
- /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8152);
48903
+ /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1037);
48856
48904
 
48857
48905
 
48858
48906
  function 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; }
@@ -48888,7 +48936,7 @@ var registerCustomComponents = __webpack_require__(1264);
48888
48936
  var _require4 = __webpack_require__(2531),
48889
48937
  options = _require4.options,
48890
48938
  parseOptions = _require4.parseOptions;
48891
- var _require5 = __webpack_require__(8160),
48939
+ var _require5 = __webpack_require__(6284),
48892
48940
  calloutIcons = _require5.icons;
48893
48941
  var toPlainText = __webpack_require__(4792);
48894
48942
  var sectionAnchorId = __webpack_require__(9620);
package/dist/main.node.js CHANGED
@@ -8354,7 +8354,9 @@ var Embed = /*#__PURE__*/function (_React$Component) {
8354
8354
  border: "none",
8355
8355
  src: url,
8356
8356
  style: {
8357
- border: 'none'
8357
+ border: 'none',
8358
+ display: 'flex',
8359
+ margin: 'auto'
8358
8360
  }
8359
8361
  }));
8360
8362
  }
@@ -9980,6 +9982,9 @@ __webpack_require__.d(__webpack_exports__, {
9980
9982
  "sanitize": () => (/* binding */ sanitize)
9981
9983
  });
9982
9984
 
9985
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
9986
+ var toConsumableArray = __webpack_require__(319);
9987
+ var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
9983
9988
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
9984
9989
  var slicedToArray = __webpack_require__(3038);
9985
9990
  var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
@@ -9997,6 +10002,7 @@ var trim = __webpack_require__(2745);
9997
10002
  var trim_default = /*#__PURE__*/__webpack_require__.n(trim);
9998
10003
  ;// CONCATENATED MODULE: ./processor/parse/flavored/callout.js
9999
10004
 
10005
+
10000
10006
  /* eslint-disable no-plusplus */
10001
10007
  /* eslint-disable consistent-return */
10002
10008
 
@@ -10051,7 +10057,6 @@ function blockquoteReadme(eat, value, silent) {
10051
10057
  var line;
10052
10058
  var startIndex;
10053
10059
  var prefixed;
10054
- var icon;
10055
10060
  while (index < length) {
10056
10061
  character = value.charAt(index);
10057
10062
  if (character !== space && character !== tab) {
@@ -10115,19 +10120,13 @@ function blockquoteReadme(eat, value, silent) {
10115
10120
  offsets[currentLine] = (offsets[currentLine] || 0) + indents[index];
10116
10121
  currentLine++;
10117
10122
  }
10118
- var match;
10119
- var title;
10120
- var body;
10121
- if (match = contents[0].match(regex)) {
10122
- icon = match[1];
10123
- contents[0] = contents[0].slice(match[0].length);
10124
- title = trim_default()(contents[0]);
10125
- body = trim_default()(contents.slice(1).join(lineFeed));
10126
- }
10127
- var exit = self.enterBlock();
10128
- contents = self.tokenizeBlock(contents.join(lineFeed), now);
10129
- exit();
10123
+ var _ref3 = contents[0].match(regex) || [],
10124
+ _ref4 = slicedToArray_default()(_ref3, 2),
10125
+ match = _ref4[0],
10126
+ icon = _ref4[1];
10130
10127
  if (icon) {
10128
+ var title = trim_default()(contents[0].slice(match.length));
10129
+ var body = trim_default()(contents.slice(1).join(lineFeed));
10131
10130
  var data = {
10132
10131
  hName: 'rdme-callout',
10133
10132
  hProperties: {
@@ -10137,15 +10136,21 @@ function blockquoteReadme(eat, value, silent) {
10137
10136
  theme: themes[icon] || 'default'
10138
10137
  }
10139
10138
  };
10139
+ var _exit = self.enterBlock();
10140
+ var _children = [].concat(toConsumableArray_default()(self.tokenizeBlock(title, now)), toConsumableArray_default()(self.tokenizeBlock(body, now)));
10141
+ _exit();
10140
10142
  return add({
10141
10143
  type: 'rdme-callout',
10142
- children: contents,
10144
+ children: _children,
10143
10145
  data: data
10144
10146
  });
10145
10147
  }
10148
+ var exit = self.enterBlock();
10149
+ var children = self.tokenizeBlock(contents.join(lineFeed), now);
10150
+ exit();
10146
10151
  return add({
10147
10152
  type: 'blockquote',
10148
- children: contents
10153
+ children: children
10149
10154
  });
10150
10155
  }
10151
10156
  function parser() {
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.55.1",
5
+ "version": "6.56.0",
6
6
  "main": "dist/main.node.js",
7
7
  "browser": "dist/main.js",
8
8
  "files": [