Skip to content

Commit 8ab6371

Browse files
committed
Add improved docs
1 parent 048af37 commit 8ab6371

File tree

2 files changed

+249
-50
lines changed

2 files changed

+249
-50
lines changed

lib/index.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@
4848
* Do not use an extra space when closing self-closing elements: `<img/>`
4949
* instead of `<img />`.
5050
* @property {number | null | undefined} [printWidth=Infinity]
51-
* Specify the line length that the printer will wrap on.
52-
* This is not a hard maximum width: things will be printed longer and
53-
* shorter.
51+
* Try and wrap syntax at this width.
5452
*
55-
* Note: this option is only used for JSX tags currently, and might be moved
56-
* to `mdast-util-to-markdown` in the future.
53+
* When set to a finite number (say, `80`), the formatter will print
54+
* attributes on separate lines when a tag doesn’t fit on one line.
55+
* The normal behavior is to print attributes with spaces between them
56+
* instead of line endings.
5757
*/
5858

5959
import {ccount} from 'ccount'
@@ -473,6 +473,10 @@ export function mdxJsxFromMarkdown() {
473473
/**
474474
* Create an extension for `mdast-util-to-markdown` to enable MDX JSX.
475475
*
476+
* This extension configures `mdast-util-to-markdown` with
477+
* `options.fences: true` and `options.resourceLink: true` too, do not
478+
* overwrite them!
479+
*
476480
* @param {ToMarkdownOptions | null | undefined} [options]
477481
* Configuration.
478482
* @returns {ToMarkdownExtension}

0 commit comments

Comments
 (0)