@readme/markdown 7.5.1 → 7.5.2

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 CHANGED
@@ -65308,7 +65308,14 @@ const readmeToMdx = () => tree => {
65308
65308
  if ('url' in image)
65309
65309
  image.data.hProperties.src = image.url;
65310
65310
  const attributes = toAttributes(image.data.hProperties, imageAttrs);
65311
- if (hasExtra(attributes)) {
65311
+ if (image.data.hProperties.className === 'emoji') {
65312
+ parent.children.splice(index, 1, {
65313
+ type: NodeTypes.emoji,
65314
+ name: image.title.replace(/^:(.*):$/, '$1'),
65315
+ value: image.title,
65316
+ });
65317
+ }
65318
+ else if (hasExtra(attributes)) {
65312
65319
  parent.children.splice(index, 1, {
65313
65320
  type: 'mdxJsxFlowElement',
65314
65321
  name: 'Image',
package/dist/main.node.js CHANGED
@@ -66295,7 +66295,14 @@ const readmeToMdx = () => tree => {
66295
66295
  if ('url' in image)
66296
66296
  image.data.hProperties.src = image.url;
66297
66297
  const attributes = toAttributes(image.data.hProperties, imageAttrs);
66298
- if (hasExtra(attributes)) {
66298
+ if (image.data.hProperties.className === 'emoji') {
66299
+ parent.children.splice(index, 1, {
66300
+ type: NodeTypes.emoji,
66301
+ name: image.title.replace(/^:(.*):$/, '$1'),
66302
+ value: image.title,
66303
+ });
66304
+ }
66305
+ else if (hasExtra(attributes)) {
66299
66306
  parent.children.splice(index, 1, {
66300
66307
  type: 'mdxJsxFlowElement',
66301
66308
  name: 'Image',
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": "7.5.1",
5
+ "version": "7.5.2",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",