prettier/tests/markdown_table/__snapshots__/jsfmt.spec.js.snap

179 lines
6.3 KiB
Plaintext
Raw Normal View History

feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`align.md 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80
proseWrap: "always"
| printWidth
=====================================input======================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
|a|b|c|
|:--|:-:|--:|
|d|e|f|
=====================================output=====================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
| a | b | c |
| :-- | :-: | --: |
| d | e | f |
================================================================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
`;
exports[`cjk.md 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80
proseWrap: "always"
| printWidth
=====================================input======================================
| abc | def | ghi |
| --- | --- | --- |
| 第一欄 | 第二欄 | 第三欄 |
=====================================output=====================================
| abc | def | ghi |
| ------ | ------ | ------ |
| 第一欄 | 第二欄 | 第三欄 |
================================================================================
`;
exports[`emoji.md 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80
proseWrap: "always"
| printWidth
=====================================input======================================
| abc | def | ghi |
| --- | --- | --- |
| 👍👍👍 | 👍👍👍 | 👍👍👍 |
=====================================output=====================================
| abc | def | ghi |
| ------ | ------ | ------ |
| 👍👍👍 | 👍👍👍 | 👍👍👍 |
================================================================================
`;
exports[`empty.md 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80
proseWrap: "always"
| printWidth
=====================================input======================================
Foo | Bar
--- | ---
X |
Y |
=====================================output=====================================
| Foo | Bar |
| --- | --- |
| X |
| Y |
================================================================================
`;
exports[`escape.md 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80
proseWrap: "always"
| printWidth
=====================================input======================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
| a | b | c |
|:--|:-:|--:|
| \\| | \\| | \\| |
=====================================output=====================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
| a | b | c |
| :-- | :-: | --: |
| \\| | \\| | \\| |
================================================================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
`;
exports[`html.md 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80
proseWrap: "always"
| printWidth
=====================================input======================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
Default | CLI Override | API Override
--------|--------------|-------------
\`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code>
=====================================output=====================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
| Default | CLI Override | API Override |
| -------- | ------------------------------------------------------ | ------------------------------------------------------ |
| \`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code> |
================================================================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
`;
exports[`simple.md 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80
proseWrap: "always"
| printWidth
=====================================input======================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
| Title A | Title B | Title C |
|---|---|---|
| content A | content B | content C |
=====================================output=====================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
| Title A | Title B | Title C |
| --------- | --------- | --------- |
| content A | content B | content C |
================================================================================
feat: support markdown (#2943) * feat(markdown): inital implementation * feat(markdown): support strong * fix: add missing default value * feat(markdown): support inlineCode * feat: support delete * feat: support link * feat: support image * feat: support blockquote * feat: support heading * feat: support code * feat: support yaml * feat: support html * feat: support list * feat: support thematicBreak * feat: support table * feat: support linkReference * feat: support imageReference * feat: support definition * feat: support footnote * feat: support footnoteReference * feat: support footnoteDefinition * test(cli): update snapshots * refactor: extract SINGLE_LINE_NODE_TYPES * refactor: printChildren * fix: correct newlines * test: add trailing newline * fix: blockquote formatting * fix: node types * fix: break line correctly * fix: remove unnecessary properties to make AST_COMPARE happy * fix: escape `|` in tableCell content * fix: unexpected line break * fix: ast difference from loose list * fix: html break lines * refactor: fix linting * fix: normalize ast * fix: escape specific chars * test: add more tests * fix: build markdown parser * chore: remove unnecessary *.log * fix: escape html entity * feat: support prettier-ignore * fix: line break for non-loose listItem * feat: support formatting `code` based on `lang` * fix: add `jsx` and `tsx` * fix: use multiparser * refactor: fix linting * test: update test case 😉 * feat: switch to `_` style emphasis * fix: sequence list should use different prefix * test: add tests * fix: do not print additional new line after `prettier-ignore` * fix(list): enforce `1.` to avoid unnecessary git diff * feat: enable `commonmark` option * feat: support `break` * fix: escape backslash * refactor: escape html entity using backslash * fix: respect autolink-style link * feat: support md`...` and markdown`...` * docs: replace ands with commas * fix: respect indented code block * fix: respect html entity * docs: add docs for modified MDAST * fix: inlineCode is breakline-able * feat: support backtick in inlineCode * feat: support a-lot-of-backtick in fenced code block * feat: use `~~~`-style code block in js template * fix: respect escaped chars * fix: use `*`-style emphasis for invalid `_`-style output * test: add test cases * fix: use `- - -`-style thematicBreak to avoid conflict with yaml * fix: remain the same content for linkReference identifier * fix: `inlineCode` gap can be a line break * fix: `html` should not print trailing spaces if it's in root * refactor: fix typo * fix: wrap `definition`'s url if there's whitespace * fix: remove unnecessary whitespace at the end of paragraph * fix: fix: remove unnecessary whitespace at the start of paragraph * fix: setence children length is possible 0 * fix: support continuous ordered list * fix: do not print addtional hardline after loose list * fix: use double-backtick style for single-backtick value in inlineCode * fix: support nested emphasis * fix: support space-url in link/image * fix: escape `)` in link/image url * fix: support single-quote in link/image/definition title * fix: respect alt in image/imageReference * fix: use `*`-style thematicBreak in list * fix: loose/tight list linebreaks * fix: print third linebreak before indented code block with a tight list in the previous * test: move bug cases * fix: remove unnecessary linebreaks * refactor: fix typo
2017-10-12 01:46:44 +03:00
`;
exports[`table.md 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80
proseWrap: "always"
| printWidth
=====================================input======================================
- min-table
| Age | Time | Food | Gold | Requirement |
| ------------ | ----- | ---- | ---- | ----------------------- |
| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 |
| Castle Age | 02:40 | 800 | 200 |- |
| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 |
- big-table
|学号|姓名|分数|
|-|-|-|
|小明|男|75|
|小红|女|79|
|小陆|男|92|
=====================================output=====================================
- min-table
| Age | Time | Food | Gold | Requirement |
| ------------ | ----- | ---- | ---- | ----------------------- |
| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 |
| Castle Age | 02:40 | 800 | 200 | - |
| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 |
- big-table
| 学号 | 姓名 | 分数 |
| ---- | ---- | ---- |
| 小明 | 男 | 75 |
| 小红 | 女 | 79 |
| 小陆 | 男 | 92 |
================================================================================
`;