fix(markdown): use the most popular unordered list style (#3027)

master
Ika 2017-10-14 06:41:25 -05:00 committed by Lucas Azzola
parent 2ef879f20d
commit 5c789b2dfc
9 changed files with 316 additions and 285 deletions

View File

@ -163,16 +163,16 @@ function genericPrint(path, options, print) {
: node.value; : node.value;
} }
case "list": { case "list": {
const nthSiblingIndex = getNthSiblingIndex( const nthSiblingIndex = getNthListSiblingIndex(
path, node,
siblingNode => siblingNode.ordered === node.ordered path.getParentNode()
); );
return printChildren(path, options, print, { return printChildren(path, options, print, {
processor: (childPath, index) => { processor: (childPath, index) => {
const prefix = node.ordered const prefix = node.ordered
? (index === 0 ? node.start : 1) + ? (index === 0 ? node.start : 1) +
(nthSiblingIndex % 2 === 0 ? ". " : ") ") (nthSiblingIndex % 2 === 0 ? ". " : ") ")
: nthSiblingIndex % 2 === 0 ? "- " : "+ "; : nthSiblingIndex % 2 === 0 ? "* " : "- ";
return concat([prefix, align(prefix.length, childPath.call(print))]); return concat([prefix, align(prefix.length, childPath.call(print))]);
} }
}); });
@ -185,8 +185,17 @@ function genericPrint(path, options, print) {
align(prefix.length, printChildren(path, options, print)) align(prefix.length, printChildren(path, options, print))
]); ]);
} }
case "thematicBreak": case "thematicBreak": {
return getAncestorNode(path, "list") ? "* * *" : "- - -"; const counter = getAncestorCounter(path, "list");
if (counter === -1) {
return "- - -";
}
const nthSiblingIndex = getNthListSiblingIndex(
path.getParentNode(counter),
path.getParentNode(counter + 1)
);
return nthSiblingIndex % 2 === 0 ? "- - -" : "* * *";
}
case "linkReference": case "linkReference":
return concat([ return concat([
"[", "[",
@ -239,11 +248,16 @@ function genericPrint(path, options, print) {
} }
} }
function getNthSiblingIndex(path, condition) { function getNthListSiblingIndex(node, parentNode) {
condition = condition || (() => true); return getNthSiblingIndex(
node,
parentNode,
siblingNode => siblingNode.ordered === node.ordered
);
}
const node = path.getValue(); function getNthSiblingIndex(node, parentNode, condition) {
const parentNode = path.getParentNode(); condition = condition || (() => true);
let index = -1; let index = -1;
@ -260,19 +274,24 @@ function getNthSiblingIndex(path, condition) {
} }
} }
function getAncestorNode(path, typeOrTypes) { function getAncestorCounter(path, typeOrTypes) {
const types = [].concat(typeOrTypes); const types = [].concat(typeOrTypes);
let counter = 0; let counter = -1;
let ancestorNode; let ancestorNode;
while ((ancestorNode = path.getParentNode(counter++))) { while ((ancestorNode = path.getParentNode(++counter))) {
if (types.indexOf(ancestorNode.type) !== -1) { if (types.indexOf(ancestorNode.type) !== -1) {
return ancestorNode; return counter;
} }
} }
return null; return -1;
}
function getAncestorNode(path, typeOrTypes) {
const counter = getAncestorCounter(path, typeOrTypes);
return counter === -1 ? null : path.getParentNode(counter);
} }
function printTable(path, options, print) { function printTable(path, options, print) {

View File

@ -909,14 +909,14 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
Prettier is an opinionated code formatter with support for: Prettier is an opinionated code formatter with support for:
- JavaScript, including * JavaScript, including
[ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md) [ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md)
- [JSX](https://facebook.github.io/jsx/) * [JSX](https://facebook.github.io/jsx/)
- [Flow](https://flow.org/) * [Flow](https://flow.org/)
- [TypeScript](https://www.typescriptlang.org/) * [TypeScript](https://www.typescriptlang.org/)
- CSS, [LESS](http://lesscss.org/), and [SCSS](http://sass-lang.com) * CSS, [LESS](http://lesscss.org/), and [SCSS](http://sass-lang.com)
- [JSON](http://json.org/) * [JSON](http://json.org/)
- [GraphQL](http://graphql.org/) * [GraphQL](http://graphql.org/)
It removes all original styling[\\*](#styling-footnote) and ensures that all It removes all original styling[\\*](#styling-footnote) and ensures that all
outputted code conforms to a consistent style. (See this [blog outputted code conforms to a consistent style. (See this [blog
@ -929,53 +929,53 @@ post](http://jlongster.com/A-Prettier-Formatter))
<!-- toc --> <!-- toc -->
- [What does Prettier do?](#what-does-prettier-do) * [What does Prettier do?](#what-does-prettier-do)
- [Why Prettier?](#why-prettier) * [Why Prettier?](#why-prettier)
- [Building and enforcing a style * [Building and enforcing a style
guide](#building-and-enforcing-a-style-guide) guide](#building-and-enforcing-a-style-guide)
- [Helping Newcomers](#helping-newcomers) * [Helping Newcomers](#helping-newcomers)
- [Writing code](#writing-code) * [Writing code](#writing-code)
- [Easy to adopt](#easy-to-adopt) * [Easy to adopt](#easy-to-adopt)
- [Clean up an existing codebase](#clean-up-an-existing-codebase) * [Clean up an existing codebase](#clean-up-an-existing-codebase)
- [Ride the hype train](#ride-the-hype-train) * [Ride the hype train](#ride-the-hype-train)
- [How does it compare to ESLint (or TSLint, * [How does it compare to ESLint (or TSLint,
stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint) stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint)
- [Usage](#usage) * [Usage](#usage)
- [CLI](#cli) * [CLI](#cli)
- [ESLint](#eslint) * [ESLint](#eslint)
- [Pre-commit Hook](#pre-commit-hook) * [Pre-commit Hook](#pre-commit-hook)
- [API](#api) * [API](#api)
- [Excluding code from formatting](#excluding-code-from-formatting) * [Excluding code from formatting](#excluding-code-from-formatting)
- [Options](#options) * [Options](#options)
- [Print Width](#print-width) * [Print Width](#print-width)
- [Tab Width](#tab-width) * [Tab Width](#tab-width)
- [Tabs](#tabs) * [Tabs](#tabs)
- [Semicolons](#semicolons) * [Semicolons](#semicolons)
- [Quotes](#quotes) * [Quotes](#quotes)
- [Trailing Commas](#trailing-commas) * [Trailing Commas](#trailing-commas)
- [Bracket Spacing](#bracket-spacing) * [Bracket Spacing](#bracket-spacing)
- [JSX Brackets](#jsx-brackets) * [JSX Brackets](#jsx-brackets)
- [Range](#range) * [Range](#range)
- [Parser](#parser) * [Parser](#parser)
- [Filepath](#filepath) * [Filepath](#filepath)
- [Configuration File](#configuration-file) * [Configuration File](#configuration-file)
- [Basic Configuration](#basic-configuration) * [Basic Configuration](#basic-configuration)
- [Configuration Overrides](#configuration-overrides) * [Configuration Overrides](#configuration-overrides)
- [Configuration Schema](#configuration-schema) * [Configuration Schema](#configuration-schema)
- [Editor Integration](#editor-integration) * [Editor Integration](#editor-integration)
- [Atom](#atom) * [Atom](#atom)
- [Emacs](#emacs) * [Emacs](#emacs)
- [Vim](#vim) * [Vim](#vim)
- [Visual Studio Code](#visual-studio-code) * [Visual Studio Code](#visual-studio-code)
- [Visual Studio](#visual-studio) * [Visual Studio](#visual-studio)
- [Sublime Text](#sublime-text) * [Sublime Text](#sublime-text)
- [JetBrains WebStorm, PHPStorm, * [JetBrains WebStorm, PHPStorm,
PyCharm...](#jetbrains-webstorm-phpstorm-pycharm) PyCharm...](#jetbrains-webstorm-phpstorm-pycharm)
- [Language Support](#language-support) * [Language Support](#language-support)
- [Related Projects](#related-projects) * [Related Projects](#related-projects)
- [Technical Details](#technical-details) * [Technical Details](#technical-details)
- [Badge](#badge) * [Badge](#badge)
- [Contributing](#contributing) * [Contributing](#contributing)
<!-- tocstop --> <!-- tocstop -->
@ -1043,20 +1043,20 @@ is valuable for a project and team but getting there is a very painful and
unrewarding process. People get very emotional around particular ways of writing unrewarding process. People get very emotional around particular ways of writing
code and nobody likes spending time writing and receiving nits. code and nobody likes spending time writing and receiving nits.
- “We want to free mental threads and end discussions around style. While * “We want to free mental threads and end discussions around style. While
sometimes fruitful, these discussions are for the most part wasteful.” sometimes fruitful, these discussions are for the most part wasteful.”
- “Literally had an engineer go through a huge effort of cleaning up all of our * “Literally had an engineer go through a huge effort of cleaning up all of our
code because we were debating ternary style for the longest time and were code because we were debating ternary style for the longest time and were
inconsistent about it. It was dumb, but it was a weird on-going "great debate" inconsistent about it. It was dumb, but it was a weird on-going "great debate"
that wasted lots of little back and forth bits. It's far easier for us all to that wasted lots of little back and forth bits. It's far easier for us all to
agree now: just run Prettier, and go with that style.” agree now: just run Prettier, and go with that style.”
- “Getting tired telling people how to style their product code.” * “Getting tired telling people how to style their product code.”
- “Our top reason was to stop wasting our time debating style nits.” * “Our top reason was to stop wasting our time debating style nits.”
- “Having a githook set up has reduced the amount of style issues in PRs that * “Having a githook set up has reduced the amount of style issues in PRs that
result in broken builds due to ESLint rules or things I have to nit-pick or result in broken builds due to ESLint rules or things I have to nit-pick or
clean up later.” clean up later.”
- “I don't want anybody to nitpick any other person ever again.” * “I don't want anybody to nitpick any other person ever again.”
- “It reminds me of how Steve Jobs used to wear the same clothes every day * “It reminds me of how Steve Jobs used to wear the same clothes every day
because he has a million decisions to make and he didn't want to be bothered because he has a million decisions to make and he didn't want to be bothered
to make trivial ones like picking out clothes. I think Prettier is like that.” to make trivial ones like picking out clothes. I think Prettier is like that.”
@ -1070,14 +1070,14 @@ from experienced engineers joining the company, as they likely used a different
coding style before, and developers coming from a different programming coding style before, and developers coming from a different programming
language. language.
- “My motivations for using Prettier are: appearing that I know how to write * “My motivations for using Prettier are: appearing that I know how to write
JavaScript well.” JavaScript well.”
- “I always put spaces in the wrong place, now I don't have to worry about it * “I always put spaces in the wrong place, now I don't have to worry about it
anymore.” anymore.”
- “When you're a beginner you're making a lot of mistakes caused by the syntax. * “When you're a beginner you're making a lot of mistakes caused by the syntax.
Thanks to Prettier, you can reduce these mistakes and save a lot of time to Thanks to Prettier, you can reduce these mistakes and save a lot of time to
focus on what really matters.” focus on what really matters.”
- “As a teacher, I will also tell to my students to install Prettier to help * “As a teacher, I will also tell to my students to install Prettier to help
them to learn the JS syntax and have readable files.” them to learn the JS syntax and have readable files.”
### Writing code ### Writing code
@ -1087,9 +1087,9 @@ they actually spend a lot of time and mental energy formatting their code. With
Prettier editor integration, you can just press that magic key binding and poof, Prettier editor integration, you can just press that magic key binding and poof,
the code is formatted. This is an eye opening experience if anything else. the code is formatted. This is an eye opening experience if anything else.
- “I want to write code. Not spend cycles on formatting.” * “I want to write code. Not spend cycles on formatting.”
- “It removed 5% that sucks in our daily life - aka formatting” * “It removed 5% that sucks in our daily life - aka formatting”
- “We're in 2017 and it's still painful to break a call into multiple lines when * “We're in 2017 and it's still painful to break a call into multiple lines when
you happen to add an argument that makes it go over the 80 columns limit :(“ you happen to add an argument that makes it go over the 80 columns limit :(“
### Easy to adopt ### Easy to adopt
@ -1101,16 +1101,16 @@ only should it be painless for you to do it technically but the newly formatted
codebase should not generate major controversy and be accepted painlessly by codebase should not generate major controversy and be accepted painlessly by
your co-workers. your co-workers.
- “It's low overhead. We were able to throw Prettier at very different kinds of * “It's low overhead. We were able to throw Prettier at very different kinds of
repos without much work.” repos without much work.”
- “It's been mostly bug free. Had there been major styling issues during the * “It's been mostly bug free. Had there been major styling issues during the
course of implementation we would have been wary about throwing this at our JS course of implementation we would have been wary about throwing this at our JS
codebase. I'm happy to say that's not the case.” codebase. I'm happy to say that's not the case.”
- “Everyone runs it as part of their pre commit scripts, a couple of us use the * “Everyone runs it as part of their pre commit scripts, a couple of us use the
editor on save extensions as well.” editor on save extensions as well.”
- “It's fast, against one of our larger JS codebases we were able to run * “It's fast, against one of our larger JS codebases we were able to run
Prettier in under 13 seconds.” Prettier in under 13 seconds.”
- “The biggest benefit for Prettier for us was being able to format the entire * “The biggest benefit for Prettier for us was being able to format the entire
code base at once.” code base at once.”
### Clean up an existing codebase ### Clean up an existing codebase
@ -1120,8 +1120,8 @@ often slips through the cracks and you are left working on inconsistent
codebases. Running Prettier in this case is a quick win, the codebase is now codebases. Running Prettier in this case is a quick win, the codebase is now
uniform and easier to read without spending hardly any time. uniform and easier to read without spending hardly any time.
- “Take a look at the code :) I just need to restore sanity.” * “Take a look at the code :) I just need to restore sanity.”
- “We inherited a ~2000 module ES6 code base, developed by 20 different * “We inherited a ~2000 module ES6 code base, developed by 20 different
developers over 18 months, in a global team. Felt like such a win without much developers over 18 months, in a global team. Felt like such a win without much
research.” research.”
@ -1131,11 +1131,11 @@ Purely technical aspects of the projects aren't the only thing people look into
when choosing to adopt Prettier. Who built and uses it and how quickly it when choosing to adopt Prettier. Who built and uses it and how quickly it
spreads through the community has a non-trivial impact. spreads through the community has a non-trivial impact.
- “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted * “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted
by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo” by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo”
- “Was built by the same people as React & React Native.” * “Was built by the same people as React & React Native.”
- “I like to be part of the hot new things.” * “I like to be part of the hot new things.”
- “Because soon enough people are gonna ask for it.” * “Because soon enough people are gonna ask for it.”
A few of the [many projects](https://www.npmjs.com/browse/depended/prettier) A few of the [many projects](https://www.npmjs.com/browse/depended/prettier)
using Prettier: using Prettier:
@ -1467,8 +1467,8 @@ The function optionally accepts an input file path as an argument, which
defaults to the current working directory. A promise is returned which will defaults to the current working directory. A promise is returned which will
resolve to: resolve to:
- An options object, providing a [config file](#configuration-file) was found. * An options object, providing a [config file](#configuration-file) was found.
- \`null\`, if no file was found. * \`null\`, if no file was found.
The promise will be rejected if there was an error parsing the configuration The promise will be rejected if there was an error parsing the configuration
file. file.
@ -1596,8 +1596,8 @@ Print semicolons at the ends of statements.
Valid options: Valid options:
- \`true\` - Add a semicolon at the end of every statement. * \`true\` - Add a semicolon at the end of every statement.
- \`false\` - Only add semicolons at the beginning of lines that may introduce ASI * \`false\` - Only add semicolons at the beginning of lines that may introduce ASI
failures. failures.
| Default | CLI Override | API Override | | Default | CLI Override | API Override |
@ -1610,8 +1610,8 @@ Use single quotes instead of double quotes.
Notes: Notes:
- Quotes in JSX will always be double and ignore this setting. * Quotes in JSX will always be double and ignore this setting.
- If the number of quotes outweighs the other quote, the quote which is less * If the number of quotes outweighs the other quote, the quote which is less
used will be used to format the string - Example: \`"I'm double quoted"\` used will be used to format the string - Example: \`"I'm double quoted"\`
results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\` results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\`
results in \`'This "example" is single quoted'\`. results in \`'This "example" is single quoted'\`.
@ -1627,9 +1627,9 @@ for example, never gets trailing commas.)
Valid options: Valid options:
- \`"none"\` - No trailing commas. * \`"none"\` - No trailing commas.
- \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.) * \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.)
- \`"all"\` - Trailing commas wherever possible (including function arguments). * \`"all"\` - Trailing commas wherever possible (including function arguments).
This requires node 8 or a This requires node 8 or a
[transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/).
@ -1643,8 +1643,8 @@ Print spaces between brackets in object literals.
Valid options: Valid options:
- \`true\` - Example: \`{ foo: bar }\`. * \`true\` - Example: \`{ foo: bar }\`.
- \`false\` - Example: \`{foo: bar}\`. * \`false\` - Example: \`{foo: bar}\`.
| Default | CLI Override | API Override | | Default | CLI Override | API Override |
| ------- | ---------------------- | ------------------------ | | ------- | ---------------------- | ------------------------ |
@ -1666,8 +1666,8 @@ Format only a segment of a file.
These two options can be used to format code starting and ending at a given These two options can be used to format code starting and ending at a given
character offset (inclusive and exclusive, respectively). The range will extend: character offset (inclusive and exclusive, respectively). The range will extend:
- Backwards to the start of the first line containing the selected statement. * Backwards to the start of the first line containing the selected statement.
- Forwards to the end of the selected statement. * Forwards to the end of the selected statement.
These options cannot be used with \`cursorOffset\`. These options cannot be used with \`cursorOffset\`.
@ -1686,14 +1686,14 @@ input file path, so you shouldn't have to change this setting.
Built-in parsers: Built-in parsers:
- [\`babylon\`](https://github.com/babel/babylon/) * [\`babylon\`](https://github.com/babel/babylon/)
- [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser) * [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser)
- [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since * [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since
v1.4.0_ v1.4.0_
- [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_ * [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_
- [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) * [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options)
_Since v1.5.0_ _Since v1.5.0_
- [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language) * [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language)
_Since v1.5.0_ _Since v1.5.0_
[Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ [Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_
@ -1748,10 +1748,10 @@ or
Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for
configuration file support. This means you can configure prettier via: configuration file support. This means you can configure prettier via:
- A \`.prettierrc\` file, written in YAML or JSON, with optional extensions: * A \`.prettierrc\` file, written in YAML or JSON, with optional extensions:
\`.yaml/.yml/.json/.js\`. \`.yaml/.yml/.json/.js\`.
- A \`prettier.config.js\` file that exports an object. * A \`prettier.config.js\` file that exports an object.
- A \`"prettier"\` key in your \`package.json\` file. * A \`"prettier"\` key in your \`package.json\` file.
The configuration file will be resolved starting from the location of the file The configuration file will be resolved starting from the location of the file
being formatted, and searching up the file tree until a config file is (or being formatted, and searching up the file tree until a config file is (or
@ -1905,42 +1905,42 @@ ability to have leading \`|\` for type definitions which prettier outputs.
## Related Projects ## Related Projects
- [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier) * [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier)
plugs Prettier into your ESLint workflow plugs Prettier into your ESLint workflow
- [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier) * [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier)
turns off all ESLint rules that are unnecessary or might conflict with turns off all ESLint rules that are unnecessary or might conflict with
Prettier Prettier
- [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) passes * [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) passes
\`prettier\` output to \`eslint --fix\` \`prettier\` output to \`eslint --fix\`
- [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint) * [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint)
passes \`prettier\` output to \`stylelint --fix\` passes \`prettier\` output to \`stylelint --fix\`
- [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) uses * [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) uses
\`prettier\` and \`prettier-eslint\` to format code with standard rules \`prettier\` and \`prettier-eslint\` to format code with standard rules
- [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter) * [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter)
passes \`prettier\` output to \`standard --fix\` passes \`prettier\` output to \`standard --fix\`
- [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous) * [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous)
\`prettier\` with a few minor extra options \`prettier\` with a few minor extra options
- [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier) * [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier)
allows you to use Prettier as a Neutrino preset allows you to use Prettier as a Neutrino preset
- [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier * [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier
as a server to avoid Node.js startup delay. It also supports configuration via as a server to avoid Node.js startup delay. It also supports configuration via
\`.prettierrc\`, \`package.json\`, and \`.editorconfig\`. \`.prettierrc\`, \`package.json\`, and \`.editorconfig\`.
- [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet * [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet
and exposes a REST API for Prettier that allows to format CodeMirror editor in and exposes a REST API for Prettier that allows to format CodeMirror editor in
your browser your browser
- [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code * [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code
in GitHub comments in GitHub comments
- [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier) * [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier)
allows you to use Prettier with Rollup allows you to use Prettier with Rollup
- [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier) * [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier)
allows you to use Prettier to format JS allows you to use Prettier to format JS
[codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) [codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/)
in Markdown files via [Markdown in Markdown files via [Markdown
Magic](https://github.com/DavidWells/markdown-magic) Magic](https://github.com/DavidWells/markdown-magic)
- [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier) * [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier)
runs Prettier as a TSLint rule and reports differences as individual TSLint runs Prettier as a TSLint rule and reports differences as individual TSLint
issues issues
- [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier) * [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier)
use TSLint with Prettier without any conflict use TSLint with Prettier without any conflict
## Technical Details ## Technical Details
@ -2259,30 +2259,30 @@ This is a paragraph.
> >
> Markdown.generate(); > Markdown.generate();
- Red * Red
- Green * Green
- Blue * Blue
+ Red
+ Green
+ Blue
- Red - Red
- Green - Green
- Blue - Blue
* Red
* Green
* Blue
\`\`\`markdown \`\`\`markdown
- Red * Red
- Green * Green
- Blue * Blue
+ Red
+ Green
+ Blue
- Red - Red
- Green - Green
- Blue - Blue
* Red
* Green
* Blue
\`\`\` \`\`\`
1. Buy flour and salt 1. Buy flour and salt

View File

@ -55,7 +55,7 @@ exports[`indent.md 1`] = `
Indented Code Block Indented Code Block
Indented Code Block Indented Code Block
- \`\`\` * \`\`\`
Fenced Code Block Fenced Code Block
Fenced Code Block Fenced Code Block
Fenced Code Block Fenced Code Block

View File

@ -9,9 +9,9 @@ exports[`indented.md 1`] = `
long long long long long long long long
long long paragraph. long long paragraph.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 123 * 123
- 456 * 456
- 789 * 789
<!-- prettier-ignore --> <!-- prettier-ignore -->
- This is a long long - This is a long long
long long long long long long long long

View File

@ -4,9 +4,9 @@ exports[`checkbox.md 1`] = `
- [ ] this is a long long long long long long long long long long long long long long paragraph. - [ ] this is a long long long long long long long long long long long long long long paragraph.
- [x] this is a long long long long long long long long long long long long long long paragraph. - [x] this is a long long long long long long long long long long long long long long paragraph.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [ ] this is a long long long long long long long long long long long long long * [ ] this is a long long long long long long long long long long long long long
long paragraph. long paragraph.
- [x] this is a long long long long long long long long long long long long long * [x] this is a long long long long long long long long long long long long long
long paragraph. long paragraph.
`; `;
@ -14,7 +14,7 @@ exports[`checkbox.md 1`] = `
exports[`long-paragraph.md 1`] = ` exports[`long-paragraph.md 1`] = `
- This is a long long long long long long long long long long long long long long paragraph. - This is a long long long long long long long long long long long long long long paragraph.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- This is a long long long long long long long long long long long long long * This is a long long long long long long long long long long long long long
long paragraph. long paragraph.
`; `;
@ -32,17 +32,17 @@ exports[`loose.md 1`] = `
- ghi - ghi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 123 * 123
- abc * abc
- 456 * 456
- def * def
- 789 * 789
- ghi * ghi
`; `;
@ -51,7 +51,7 @@ exports[`multiline.md 1`] = `
456 456
789 789
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 123 456 789 * 123 456 789
`; `;
@ -60,9 +60,9 @@ exports[`nested.md 1`] = `
- Level 2 - Level 2
- Level 3 - Level 3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Level 1 * Level 1
- Level 2 * Level 2
- Level 3 * Level 3
`; `;
@ -86,13 +86,13 @@ exports[`separate.md 1`] = `
* 123 * 123
* 123 * 123
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 123 * 123
- 123 * 123
- 123 * 123
+ 123 - 123
+ 123 - 123
+ 123 - 123
`; `;
@ -101,9 +101,9 @@ exports[`simple.md 1`] = `
- 456 - 456
- 789 - 789
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 123 * 123
- 456 * 456
- 789 * 789
`; `;

View File

@ -28,7 +28,7 @@ exports[`example-4.md 1`] = `
bar bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
bar bar
@ -39,7 +39,7 @@ exports[`example-5.md 1`] = `
bar bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
bar bar
@ -55,7 +55,7 @@ exports[`example-6.md 1`] = `
exports[`example-7.md 1`] = ` exports[`example-7.md 1`] = `
- foo - foo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
`; `;
@ -73,8 +73,8 @@ exports[`example-9.md 1`] = `
- bar - bar
- baz - baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- bar - baz * bar - baz
`; `;
@ -82,8 +82,8 @@ exports[`example-10.md 1`] = `
- \`one - \`one
- two\` - two\`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- \`one * \`one
- two\` * two\`
`; `;
@ -206,11 +206,11 @@ exports[`example-25.md 1`] = `
*** ***
- bar - bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- - - - - -
- bar * bar
`; `;
@ -243,11 +243,11 @@ exports[`example-28.md 1`] = `
* * * * * *
* Bar * Bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Foo * Foo
- - - - - -
- Bar * Bar
`; `;
@ -255,8 +255,8 @@ exports[`example-29.md 1`] = `
- Foo - Foo
- * * * - * * *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Foo * Foo
- * * * * - - -
`; `;
@ -611,7 +611,7 @@ exports[`example-62.md 1`] = `
- Foo - Foo
--- ---
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Foo * Foo
- - - - - -
@ -668,7 +668,7 @@ exports[`example-67.md 1`] = `
- foo - foo
----- -----
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- - - - - -
@ -771,7 +771,7 @@ exports[`example-76.md 1`] = `
bar bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
bar bar
@ -784,7 +784,7 @@ exports[`example-77.md 1`] = `
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. foo 1. foo
- bar * bar
`; `;
@ -1530,8 +1530,8 @@ exports[`example-139.md 1`] = `
- <div> - <div>
- foo - foo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- <div> * <div>
- foo * foo
`; `;
@ -2199,9 +2199,9 @@ exports[`example-195.md 1`] = `
> - foo > - foo
- bar - bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> - foo > * foo
- bar * bar
`; `;
@ -2413,7 +2413,7 @@ exports[`example-215.md 1`] = `
two two
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- one * one
two two
@ -2424,7 +2424,7 @@ exports[`example-216.md 1`] = `
two two
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- one * one
two two
@ -2435,7 +2435,7 @@ exports[`example-217.md 1`] = `
two two
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- one * one
two two
@ -2446,7 +2446,7 @@ exports[`example-218.md 1`] = `
two two
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- one * one
two two
@ -2468,7 +2468,7 @@ exports[`example-220.md 1`] = `
>> >>
> > two > > two
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > - one > > * one
> > > >
> > two > > two
@ -2511,15 +2511,15 @@ exports[`example-222.md 1`] = `
bar bar
\`\`\` \`\`\`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
bar bar
- foo * foo
bar bar
- \`\`\` * \`\`\`
foo foo
\`\`\` \`\`\`
@ -2566,7 +2566,7 @@ exports[`example-224.md 1`] = `
baz baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Foo * Foo
bar bar
@ -2582,7 +2582,7 @@ exports[`example-225.md 1`] = `
baz baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Foo * Foo
bar bar
@ -2631,7 +2631,7 @@ exports[`example-231.md 1`] = `
bar bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
bar bar
@ -2709,7 +2709,7 @@ exports[`example-237.md 1`] = `
bar bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
bar bar
@ -2720,7 +2720,7 @@ exports[`example-238.md 1`] = `
bar bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
bar bar
@ -2742,9 +2742,9 @@ exports[`example-241.md 1`] = `
- -
- bar - bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- *
- bar * bar
`; `;
@ -2753,9 +2753,9 @@ exports[`example-242.md 1`] = `
- -
- bar - bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- *
- bar * bar
`; `;
@ -2887,9 +2887,9 @@ exports[`example-253.md 1`] = `
- bar - bar
- baz - baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- bar * bar
- baz * baz
`; `;
@ -2898,9 +2898,9 @@ exports[`example-254.md 1`] = `
- bar - bar
- baz - baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- bar * bar
- baz * baz
`; `;
@ -2909,7 +2909,7 @@ exports[`example-255.md 1`] = `
- bar - bar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10. foo 10. foo
- bar * bar
`; `;
@ -2919,21 +2919,21 @@ exports[`example-256.md 1`] = `
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10. foo 10. foo
- bar * bar
`; `;
exports[`example-257.md 1`] = ` exports[`example-257.md 1`] = `
- - foo - - foo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- - foo * * foo
`; `;
exports[`example-258.md 1`] = ` exports[`example-258.md 1`] = `
1. - 2. foo 1. - 2. foo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. - 2. foo 1. * 2. foo
`; `;
@ -2943,8 +2943,8 @@ exports[`example-259.md 1`] = `
--- ---
baz baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # Foo * # Foo
- ## Bar * ## Bar
baz baz
`; `;
@ -2954,10 +2954,10 @@ exports[`example-260.md 1`] = `
- bar - bar
+ baz + baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- bar * bar
+ baz - baz
`; `;
@ -2980,8 +2980,8 @@ Foo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Foo Foo
- bar * bar
- baz * baz
`; `;
@ -3003,11 +3003,11 @@ exports[`example-264.md 1`] = `
- baz - baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- bar * bar
+ baz - baz
`; `;
@ -3018,11 +3018,11 @@ exports[`example-265.md 1`] = `
bar bar
- baz - baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
bar bar
- baz * baz
`; `;
@ -3034,9 +3034,9 @@ exports[`example-266.md 1`] = `
bim bim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- bar * bar
- baz * baz
bim bim
@ -3051,11 +3051,11 @@ exports[`example-267.md 1`] = `
- baz - baz
- bim - bim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- bar * bar
+ baz - baz
+ bim - bim
`; `;
@ -3069,11 +3069,11 @@ exports[`example-268.md 1`] = `
code code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
notcode notcode
- foo * foo
code code
@ -3091,15 +3091,15 @@ exports[`example-269.md 1`] = `
- h - h
- i - i
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
- b * b
- c * c
- d * d
- e * e
- f * f
- g * g
- h * h
- i * i
`; `;
@ -3109,10 +3109,10 @@ exports[`example-271.md 1`] = `
- c - c
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
- b * b
- c * c
`; `;
@ -3122,10 +3122,10 @@ exports[`example-272.md 1`] = `
* c * c
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
- *
+ c - c
`; `;
@ -3136,12 +3136,12 @@ exports[`example-273.md 1`] = `
c c
- d - d
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
- b * b
c c
- d * d
`; `;
@ -3152,12 +3152,12 @@ exports[`example-274.md 1`] = `
[ref]: /url [ref]: /url
- d - d
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
- b * b
[ref]: /url [ref]: /url
- d * d
`; `;
@ -3168,13 +3168,13 @@ exports[`example-276.md 1`] = `
c c
- d - d
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
- b * b
c c
- d * d
`; `;
@ -3184,9 +3184,9 @@ exports[`example-277.md 1`] = `
> >
* c * c
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
> b > b
- c * c
`; `;
@ -3198,19 +3198,19 @@ exports[`example-278.md 1`] = `
\`\`\` \`\`\`
- d - d
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
> b > b
\`\`\` \`\`\`
c c
\`\`\` \`\`\`
- d * d
`; `;
exports[`example-279.md 1`] = ` exports[`example-279.md 1`] = `
- a - a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
`; `;
@ -3218,8 +3218,8 @@ exports[`example-280.md 1`] = `
- a - a
- b - b
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
- b * b
`; `;
@ -3244,9 +3244,9 @@ exports[`example-282.md 1`] = `
baz baz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- foo * foo
- bar * bar
baz baz
@ -3261,14 +3261,14 @@ exports[`example-283.md 1`] = `
- e - e
- f - f
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- a * a
- b * b
- c * c
- d * d
- e * e
- f * f
`; `;

View File

@ -1,5 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`list.md 1`] = `
- * * *
+ - - -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* - - -
- * * *
`;
exports[`simple.md 1`] = ` exports[`simple.md 1`] = `
*** ***
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -0,0 +1,2 @@
- * * *
+ - - -

View File

@ -55,21 +55,21 @@ export default function ReadMe() {
and unrewarding process. People get very emotional around particular ways of and unrewarding process. People get very emotional around particular ways of
writing code and nobody likes spending time writing and receiving nits. writing code and nobody likes spending time writing and receiving nits.
- “We want to free mental threads and end discussions around style. While * “We want to free mental threads and end discussions around style. While
sometimes fruitful, these discussions are for the most part wasteful.” sometimes fruitful, these discussions are for the most part wasteful.”
- “Literally had an engineer go through a huge effort of cleaning up all of * “Literally had an engineer go through a huge effort of cleaning up all of
our code because we were debating ternary style for the longest time and our code because we were debating ternary style for the longest time and
were inconsistent about it. It was dumb, but it was a weird on-going were inconsistent about it. It was dumb, but it was a weird on-going
"great debate" that wasted lots of little back and forth bits. It's far "great debate" that wasted lots of little back and forth bits. It's far
easier for us all to agree now: just run Prettier, and go with that easier for us all to agree now: just run Prettier, and go with that
style.” style.”
- “Getting tired telling people how to style their product code.” * “Getting tired telling people how to style their product code.”
- “Our top reason was to stop wasting our time debating style nits.” * “Our top reason was to stop wasting our time debating style nits.”
- “Having a githook set up has reduced the amount of style issues in PRs * “Having a githook set up has reduced the amount of style issues in PRs
that result in broken builds due to ESLint rules or things I have to that result in broken builds due to ESLint rules or things I have to
nit-pick or clean up later.” nit-pick or clean up later.”
- “I don't want anybody to nitpick any other person ever again.” * “I don't want anybody to nitpick any other person ever again.”
- “It reminds me of how Steve Jobs used to wear the same clothes every day * “It reminds me of how Steve Jobs used to wear the same clothes every day
because he has a million decisions to make and he didn't want to be because he has a million decisions to make and he didn't want to be
bothered to make trivial ones like picking out clothes. I think Prettier bothered to make trivial ones like picking out clothes. I think Prettier
is like that.” is like that.”