diff --git a/src/printer-markdown.js b/src/printer-markdown.js index 214f8c60..c16e3fd1 100644 --- a/src/printer-markdown.js +++ b/src/printer-markdown.js @@ -22,7 +22,8 @@ const SINGLE_LINE_NODE_TYPES = [ "heading", "tableCell", "footnoteDefinition", - "link" + "link", + "inlineCode" ]; const SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"]; diff --git a/tests/markdown/__snapshots__/jsfmt.spec.js.snap b/tests/markdown/__snapshots__/jsfmt.spec.js.snap index 93d9cbdf..d11240c2 100644 --- a/tests/markdown/__snapshots__/jsfmt.spec.js.snap +++ b/tests/markdown/__snapshots__/jsfmt.spec.js.snap @@ -1312,8 +1312,8 @@ from this behavior use \`--with-node-modules\` flag. #### \`--write\` -This rewrites all processed files in place. This is comparable to the \`eslint ---fix\` workflow. +This rewrites all processed files in place. This is comparable to the +\`eslint --fix\` workflow. ### ESLint @@ -1856,8 +1856,8 @@ for more details see ### Visual Studio Code -Can be installed using the extension sidebar. Search for \`Prettier - JavaScript -formatter\`. +Can be installed using the extension sidebar. Search for +\`Prettier - JavaScript formatter\`. Can also be installed using \`ext install prettier-vscode\`. diff --git a/tests/markdown_inlineCode/__snapshots__/jsfmt.spec.js.snap b/tests/markdown_inlineCode/__snapshots__/jsfmt.spec.js.snap index b26b15fc..0c667dca 100644 --- a/tests/markdown_inlineCode/__snapshots__/jsfmt.spec.js.snap +++ b/tests/markdown_inlineCode/__snapshots__/jsfmt.spec.js.snap @@ -30,6 +30,13 @@ exports[`escape.md 1`] = ` `; +exports[`long.md 1`] = ` +\`this is a long long long long long long long long long long long long long long long inline code\` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\`this is a long long long long long long long long long long long long long long long inline code\` + +`; + exports[`simple.md 1`] = ` \`123\` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/markdown_inlineCode/long.md b/tests/markdown_inlineCode/long.md new file mode 100644 index 00000000..7892800d --- /dev/null +++ b/tests/markdown_inlineCode/long.md @@ -0,0 +1 @@ +`this is a long long long long long long long long long long long long long long long inline code`