forked from prettier/prettier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new Markdown option 'breakDefinitions' - Closes prettier#3531
Allows to select if Markdown definitions should be broken when 'proseWrap' is set to 'always'. This enables, for example, single line reference links, which can prevent potential rendering issues.
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
import commonOptions from "../common/common-options.evaluate.js"; | ||
|
||
const CATEGORY_MARKDOWN = "Markdown"; | ||
|
||
// format based on https://github.com/prettier/prettier/blob/main/src/main/core-options.evaluate.js | ||
const options = { | ||
proseWrap: commonOptions.proseWrap, | ||
singleQuote: commonOptions.singleQuote, | ||
breakDefinitions: { | ||
category: CATEGORY_MARKDOWN, | ||
type: "boolean", | ||
default: true, | ||
description: | ||
"Whether or not 'proseWrap' takes effect over Markdown definitions.", | ||
} | ||
}; | ||
|
||
export default options; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters