You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DOCUMENTATION.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,12 +17,13 @@ Converts a JSON input to markdown.
17
17
|`h6`| Heading 6 | The heading text as string. |`{ h6: "heading 6" }`|
18
18
|`p`| Paragraphs | The paragraph text as string or array (multiple paragraphs). |`{ p: "Hello World"}` or multiple paragraphs: `{ p: ["Hello", "World"] }`|
19
19
|`blockquote`| Blockquote | The blockquote as string or array (multiple blockquotes) |`{ blockquote: "Hello World"}` or multiple blockquotes: `{ blockquote: ["Hello", "World"] }`|
20
-
|`img`| Image | An object or an array of objects containing the `title`, `source` and `alt` fields. |`{ img: { title: "My image title", source: "http://example.com/image.png", alt: "My image alt" } }`|
21
-
|`ul`| Unordered list | An array of strings or lists representing the items. |`{ ul: ["item 1", "item 2"] }`|
22
-
|`ol`| Ordered list | An array of strings or lists representing the items. |`{ ol: ["item 1", "item 2"] }`|
20
+
|`img`| Image | An object or an array of objects containing the `title`, `source` and `alt` fields. |`{ img: { title: "My image title", source: "http://example.com/image.png", alt: "My image alt" } }`|
21
+
|`ul`| Unordered list | An array of strings or lists representing the items. |`{ ul: ["item 1", "item 2"] }`|
22
+
|`ol`| Ordered list | An array of strings or lists representing the items. |`{ ol: ["item 1", "item 2"] }`|
23
+
|`hr`| Separator | None |`{ hr: "" }`|
23
24
|`code`| Code block element | An object containing the `language` (`String`) and `content` (`Array` or `String`) fields. |`{ code: { "language": "html", "content": "<script src='dummy.js'></script>" } }`|
24
25
|`table`| Table | An object containing the `headers` (`Array` of `String`s) and `rows` (`Array` of `Array`s or `Object`s). |`{ table: { headers: ["a", "b"], rows: [{ a: "col1", b: "col2" }] } }` or `{ table: { headers: ["a", "b"], rows: [["col1", "col2"]] } }`|
25
-
| `link` | Link | An object containing the `title` and the `source` fields. | `{ title: 'hello', source: 'https://ionicabizau.net' }
26
+
|`link`| Link | An object containing the `title` and the `source` fields. |`{ title: 'hello', source: 'https://ionicabizau.net' }`|
26
27
27
28
You can extend the `json2md.converters` object to support your custom types.
Copy file name to clipboardExpand all lines: README.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,12 +192,13 @@ Converts a JSON input to markdown.
192
192
|`h6`| Heading 6 | The heading text as string. |`{ h6: "heading 6" }`|
193
193
|`p`| Paragraphs | The paragraph text as string or array (multiple paragraphs). |`{ p: "Hello World"}` or multiple paragraphs: `{ p: ["Hello", "World"] }`|
194
194
|`blockquote`| Blockquote | The blockquote as string or array (multiple blockquotes) |`{ blockquote: "Hello World"}` or multiple blockquotes: `{ blockquote: ["Hello", "World"] }`|
195
-
|`img`| Image | An object or an array of objects containing the `title`, `source` and `alt` fields. |`{ img: { title: "My image title", source: "http://example.com/image.png", alt: "My image alt" } }`|
196
-
|`ul`| Unordered list | An array of strings or lists representing the items. |`{ ul: ["item 1", "item 2"] }`|
197
-
|`ol`| Ordered list | An array of strings or lists representing the items. |`{ ol: ["item 1", "item 2"] }`|
195
+
|`img`| Image | An object or an array of objects containing the `title`, `source` and `alt` fields. |`{ img: { title: "My image title", source: "http://example.com/image.png", alt: "My image alt" } }`|
196
+
|`ul`| Unordered list | An array of strings or lists representing the items. |`{ ul: ["item 1", "item 2"] }`|
197
+
|`ol`| Ordered list | An array of strings or lists representing the items. |`{ ol: ["item 1", "item 2"] }`|
198
+
|`hr`| Separator | None |`{ hr: "" }`|
198
199
|`code`| Code block element | An object containing the `language` (`String`) and `content` (`Array` or `String`) fields. |`{ code: { "language": "html", "content": "<script src='dummy.js'></script>" } }`|
199
200
|`table`| Table | An object containing the `headers` (`Array` of `String`s) and `rows` (`Array` of `Array`s or `Object`s). |`{ table: { headers: ["a", "b"], rows: [{ a: "col1", b: "col2" }] } }` or `{ table: { headers: ["a", "b"], rows: [["col1", "col2"]] } }`|
200
-
| `link` | Link | An object containing the `title` and the `source` fields. | `{ title: 'hello', source: 'https://ionicabizau.net' }`
201
+
|`link`| Link | An object containing the `title` and the `source` fields. |`{ title: 'hello', source: 'https://ionicabizau.net' }`|
201
202
202
203
You can extend the `json2md.converters` object to support your custom types.
203
204
@@ -287,13 +288,13 @@ If you are using this library in one of your projects, add it in this list. :spa
287
288
288
289
-`@sidneys/releasenotes`
289
290
-`@microfleet/schema2md`
290
-
-`@best/github-integration`
291
291
-`@cypress/schema-tools`
292
+
-`@best/github-integration`
292
293
-`lambda-docs-2md`
293
294
-`jumia-travel-changelog`
294
295
-`@cobalt-engine/change-logger`
295
-
-`@best/store`
296
296
-`uxcore-tools`
297
+
-`@best/store`
297
298
-`p2doc`
298
299
-`pantheon_site_management`
299
300
-`react-docgen-markdown`
@@ -324,17 +325,17 @@ If you are using this library in one of your projects, add it in this list. :spa
324
325
-`parse-google-docs-json`
325
326
-`node-red-contrib-json2md`
326
327
-`dokuinjs`
327
-
-`@feizheng/react-markdown-props`
328
-
-`@e2y/bdd-dictionary-generator`
329
-
-`@s-ui/changelog`
330
328
-`lab-changelog`
331
-
-`@jswork/react-markdown-props`
332
-
-`@gracexwho/model-card-generator`
333
329
-`@bwagener/gridsome-source-google-docs`
334
330
-`asm-auto-deploy`
335
331
-`type-graphql-to-md`
332
+
-`@gracexwho/model-card-generator`
336
333
-`gatsby-source-google-docs`
337
-
-`dargstack_rgen`I am using this library to generate documentation for my projects, being integrated with [blah](https://github.com/IonicaBizau/node-blah).
334
+
-`@e2y/bdd-dictionary-generator`
335
+
-`@s-ui/changelog`
336
+
-`dargstack_rgen`
337
+
-`@feizheng/react-markdown-props`
338
+
-`@jswork/react-markdown-props`I am using this library to generate documentation for my projects, being integrated with [blah](https://github.com/IonicaBizau/node-blah).
* | `img` | Image | An object or an array of objects containing the `title`, `source` and `alt` fields. | `{ img: { title: "My image title", source: "http://example.com/image.png", alt: "My image alt" }}` |
23
23
* | `ul` | Unordered list | An array of strings or lists representing the items. | `{ ul: ["item 1", "item 2"] }` |
24
24
* | `ol` | Ordered list | An array of strings or lists representing the items. | `{ ol: ["item 1", "item 2"] }` |
25
+
* | `hr` | Separator | None | `{ hr: "" }` |
25
26
* | `code` | Code block element | An object containing the `language` (`String`) and `content` (`Array` or `String`) fields. | `{ code: { "language": "html", "content": "<script src='dummy.js'></script>" }}` |
26
27
* | `table` | Table | An object containing the `headers` (`Array` of `String`s) and `rows` (`Array` of `Array`s or `Object`s). | `{ table: { headers: ["a", "b"], rows: [{ a: "col1", b: "col2" }] }}` or `{ table: { headers: ["a", "b"], rows: [["col1", "col2"]] }}` |
27
28
* | `link` | Link | An object containing the `title` and the `source` fields. | `{ title: 'hello', source: 'https://ionicabizau.net' }` |
0 commit comments