@readme/markdown 6.74.1 → 6.74.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/README.md +13 -17
- package/dist/main.js +2 -2
- package/dist/main.node.js +2 -2
- package/package.json +1 -1
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
|
|
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
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
|
package/dist/main.js
CHANGED
|
@@ -8517,7 +8517,7 @@ var options = {
|
|
|
8517
8517
|
},
|
|
8518
8518
|
safeMode: false,
|
|
8519
8519
|
settings: {
|
|
8520
|
-
position:
|
|
8520
|
+
position: true
|
|
8521
8521
|
},
|
|
8522
8522
|
theme: 'light'
|
|
8523
8523
|
};
|
|
@@ -34983,7 +34983,7 @@ function hast(text) {
|
|
|
34983
34983
|
opts = _setup18[1];
|
|
34984
34984
|
var rdmd = htmlProcessor(opts).use(tableFlattening);
|
|
34985
34985
|
var node = rdmd.parse(text);
|
|
34986
|
-
return rdmd.runSync(node);
|
|
34986
|
+
return rdmd.runSync(node, text);
|
|
34987
34987
|
}
|
|
34988
34988
|
|
|
34989
34989
|
/**
|
package/dist/main.node.js
CHANGED
|
@@ -8886,7 +8886,7 @@ var options = {
|
|
|
8886
8886
|
},
|
|
8887
8887
|
safeMode: false,
|
|
8888
8888
|
settings: {
|
|
8889
|
-
position:
|
|
8889
|
+
position: true
|
|
8890
8890
|
},
|
|
8891
8891
|
theme: 'light'
|
|
8892
8892
|
};
|
|
@@ -34724,7 +34724,7 @@ function hast(text) {
|
|
|
34724
34724
|
opts = _setup18[1];
|
|
34725
34725
|
var rdmd = htmlProcessor(opts).use(tableFlattening);
|
|
34726
34726
|
var node = rdmd.parse(text);
|
|
34727
|
-
return rdmd.runSync(node);
|
|
34727
|
+
return rdmd.runSync(node, text);
|
|
34728
34728
|
}
|
|
34729
34729
|
|
|
34730
34730
|
/**
|
package/package.json
CHANGED