@readme/markdown 6.74.1 → 6.74.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/README.md CHANGED
@@ -1,5 +1,5 @@
1
- @readme/markdown
2
- ===
1
+ # @readme/markdown
2
+
3
3
  <img align="right" width="26%" src="https://owlbertsio-resized.s3.amazonaws.com/Reading.psd.full.png">
4
4
 
5
5
  ReadMe's flavored Markdown parser and MDX rendering engine. <img align=center src=https://github.com/readmeio/markdown/workflows/CI/badge.svg alt="RDMD CI Status">
@@ -14,28 +14,24 @@ By default, the updated markdown package exports a function which takes a string
14
14
 
15
15
  ```jsx
16
16
  import React from 'react';
17
- import rdmd from "@readme/markdown";
17
+ import rdmd from '@readme/markdown';
18
18
 
19
- export default ({ body }) => (
20
- <div className="markdown-body">
21
- {rdmd(body)}
22
- </div>
23
- );
19
+ export default ({ body }) => <div className="markdown-body">{rdmd(body)}</div>;
24
20
  ```
25
21
 
26
22
  ### Export Methods
27
23
 
28
24
  In addition to the default React processor, the package exports some other methods for transforming ReadMe-flavored markdown:
29
25
 
30
- | Export | Description | Arguments |
31
- | -------:|:---------------------------------------------- |:--------------- |
32
- |*`react`*|_(default)_ returns a VDOM tree object |`text`, `options`|
33
- |*`md`* | transform mdast in to ReadMe-flavored markdown |`tree`, `options`|
34
- |*`html`* | transform markdown in to HTML |`text`, `options`|
35
- |*`mdast`*| transform markdown to an mdast object |`text`, `options`|
36
- |*`hast`* | transform markdown to HAST object |`text`, `options`|
37
- |*`plain`*| transform markdown to plain text |`text`, `options`|
38
- |*`utils`*| contexts, defaults, helpers, etc. | N/A |
26
+ | Export | Description | Arguments |
27
+ | --------: | :--------------------------------------------- | :---------------- |
28
+ | _`react`_ | _(default)_ returns a VDOM tree object | `text`, `options` |
29
+ | _`md`_ | transform mdast in to ReadMe-flavored markdown | `tree`, `options` |
30
+ | _`html`_ | transform markdown in to HTML | `text`, `options` |
31
+ | _`mdast`_ | transform markdown to an mdast object | `text`, `options` |
32
+ | _`hast`_ | transform markdown to HAST object | `text`, `options` |
33
+ | _`plain`_ | transform markdown to plain text | `text`, `options` |
34
+ | _`utils`_ | contexts, defaults, helpers, etc. | N/A |
39
35
 
40
36
  ### Settings & Options
41
37
 
@@ -113,6 +113,7 @@
113
113
  margin-right: -0.25rem;
114
114
  }
115
115
  }
116
+
116
117
  @mixin callout-custom-icons($R: callout) {
117
118
  --emoji: 1em;
118
119
  --icon-font: fontawesome;
@@ -135,6 +136,7 @@
135
136
  -webkit-font-smoothing: antialiased;
136
137
  -moz-osx-font-smoothing: grayscale;
137
138
  }
139
+
138
140
  @at-root .rdmdCallouts--useIconFont & {
139
141
  --emoji: unset;
140
142
 
@@ -170,6 +172,7 @@
170
172
  // bump specificity
171
173
  @include callout;
172
174
  }
175
+
173
176
  @include callout-custom-icons;
174
177
 
175
178
  border-top-right-radius: var(--markdown-radius);
@@ -102,7 +102,9 @@
102
102
  background: var(--md-code-background, inherit);
103
103
  border: none;
104
104
  border-radius: 3px;
105
- box-shadow: inset 0 0 0 1px rgba(#aaa, 0.66), -1px 2px 6px -3px rgba(black, 0.1);
105
+ box-shadow:
106
+ inset 0 0 0 1px rgba(#aaa, 0.66),
107
+ -1px 2px 6px -3px rgba(black, 0.1);
106
108
  color: inherit;
107
109
  color: var(--md-code-text, inherit);
108
110
  cursor: copy;
@@ -122,12 +124,16 @@
122
124
 
123
125
  &:hover {
124
126
  &:not(:active) {
125
- box-shadow: inset 0 0 0 1px rgba(#8b8b8b, 0.75), -1px 2px 6px -3px rgba(black, 0.2);
127
+ box-shadow:
128
+ inset 0 0 0 1px rgba(#8b8b8b, 0.75),
129
+ -1px 2px 6px -3px rgba(black, 0.2);
126
130
  }
127
131
  }
128
132
 
129
133
  &:active {
130
- box-shadow: inset 0 0 0 1px rgba(#8b8b8b, 0.5), inset 1px 4px 6px -2px rgba(0, 0, 0, 0.175);
134
+ box-shadow:
135
+ inset 0 0 0 1px rgba(#8b8b8b, 0.5),
136
+ inset 1px 4px 6px -2px rgba(0, 0, 0, 0.175);
131
137
 
132
138
  &::before,
133
139
  &::after {
@@ -138,7 +144,9 @@
138
144
  &::before,
139
145
  &::after {
140
146
  display: inline-block;
141
- font: normal normal normal 1em/1 'Font Awesome 5 Free', FontAwesome;
147
+ font:
148
+ normal normal normal 1em/1 'Font Awesome 5 Free',
149
+ FontAwesome;
142
150
  font-family: ReadMe-Icons;
143
151
  font-feature-settings: 'liga';
144
152
  font-variant-ligatures: discretionary-ligatures;
@@ -83,7 +83,6 @@ Embed.defaultProps = {
83
83
  const CreateEmbed =
84
84
  ({ lazyImages }) =>
85
85
  // eslint-disable-next-line react/display-name
86
- props =>
87
- <Embed {...props} lazy={lazyImages} />;
86
+ props => <Embed {...props} lazy={lazyImages} />;
88
87
 
89
88
  module.exports = CreateEmbed;
@@ -13,6 +13,7 @@
13
13
  background: var(--md-code-background, #f6f8fa);
14
14
  box-shadow: inset 0 0 0 1px rgba(black, 0.1);
15
15
  }
16
+
16
17
  @at-root .markdown-body > #{$embed}_hasImg:nth-of-type(odd) {
17
18
  margin-right: 30px;
18
19
  padding-right: 0;
@@ -25,6 +26,7 @@
25
26
  margin-right: -30px;
26
27
  }
27
28
  }
29
+
28
30
  @at-root .markdown-body > #{$embed}_hasImg:nth-of-type(even) {
29
31
  margin-left: 30px;
30
32
  padding-left: 0;
@@ -31,7 +31,7 @@ GlossaryItem.propTypes = {
31
31
  PropTypes.shape({
32
32
  definition: PropTypes.string.isRequired,
33
33
  term: PropTypes.string.isRequired,
34
- })
34
+ }),
35
35
  ).isRequired,
36
36
  };
37
37
 
@@ -56,8 +56,7 @@ HTMLBlock.propTypes = {
56
56
  const CreateHtmlBlock =
57
57
  ({ safeMode }) =>
58
58
  // eslint-disable-next-line react/display-name
59
- props =>
60
- <HTMLBlock {...props} safeMode={safeMode} />;
59
+ props => <HTMLBlock {...props} safeMode={safeMode} />;
61
60
 
62
61
  CreateHtmlBlock.sanitize = schema => {
63
62
  schema.tagNames.push('html-block');
@@ -25,7 +25,7 @@ function Heading({ tag, showAnchorIcons, ...props }) {
25
25
  aria-label={`Skip link to ${headingText}`}
26
26
  className="heading-anchor-icon fa fa-anchor"
27
27
  href={`#${props.id}`}
28
- />
28
+ />,
29
29
  );
30
30
  }
31
31
 
@@ -102,7 +102,6 @@ Image.sanitize = sanitizeSchema => {
102
102
  const CreateImage =
103
103
  ({ lazyImages }) =>
104
104
  // eslint-disable-next-line react/display-name
105
- props =>
106
- <Image lazy={lazyImages} {...props} />;
105
+ props => <Image lazy={lazyImages} {...props} />;
107
106
 
108
107
  module.exports = CreateImage;
@@ -19,8 +19,7 @@ Style.propTypes = {
19
19
  const CreateStyle =
20
20
  ({ safeMode }) =>
21
21
  // eslint-disable-next-line react/display-name
22
- props =>
23
- <Style {...props} safeMode={safeMode} />;
22
+ props => <Style {...props} safeMode={safeMode} />;
24
23
 
25
24
  CreateStyle.sanitize = sanitize => {
26
25
  sanitize.tagNames.push('style');