diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 84d9f2f3f..d054ad131 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -5,6 +5,8 @@ # See https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt # Prettier bump after release +# 3.9.8 +88470cb79ca3b757dd6b93906d9a992aa1a456c3 # 3.9.0 bb817b1bd04c04e0a8d89cb52c256a38e17fd0f5 # 3.7.0 diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index 823cb8b4b..51afd79a3 100644 --- a/.github/ISSUE_TEMPLATE/formatting.md +++ b/.github/ISSUE_TEMPLATE/formatting.md @@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you: --> -**Prettier 3.9.7** +**Prettier 3.9.8** [Playground link](https://prettier.io/playground/#.....) ```sh diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index 70501cfcf..7159721e9 100644 --- a/.github/ISSUE_TEMPLATE/integration.md +++ b/.github/ISSUE_TEMPLATE/integration.md @@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE: **Environments:** -- Prettier Version: 3.9.7 +- Prettier Version: 3.9.8 - Running Prettier via: - Runtime: - Operating System: diff --git a/CHANGELOG.md b/CHANGELOG.md index dea72898b..1ee7ce72d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +# 3.9.8 + +[diff](https://github.com/prettier/prettier/compare/3.9.7...3.9.8) + +#### Markdown: Don't let Liquid objects interrupt paragraphs ([#20087](https://github.com/prettier/prettier/pull/20087) by [@seiyab](https://github.com/seiyab)) + + +```markdown + +If `module` is not a [`WebAssembly.Module`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module) object instance, a +{{jsxref("TypeError")}} is thrown. + + +If `module` is not a [`WebAssembly.Module`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module) object instance, a + +{{jsxref("TypeError")}} is thrown. + + +If `module` is not a [`WebAssembly.Module`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module) object instance, a +{{jsxref("TypeError")}} is thrown. +``` + # 3.9.7 [diff](https://github.com/prettier/prettier/compare/3.9.6...3.9.7) diff --git a/package.json b/package.json index 5bbf2c7da..b30838fef 100644 --- a/package.json +++ b/package.json @@ -182,7 +182,7 @@ "node-style-text": "2.1.2", "npm-run-all2": "9.0.3", "open-editor": "6.0.0", - "prettier": "3.9.7", + "prettier": "3.9.8", "pretty-bytes": "7.1.3", "pretty-ms": "9.3.1", "puppeteer": "25.11.0", diff --git a/src/language-markdown/parse/micromark/micromark-extension-liquid.js b/src/language-markdown/parse/micromark/micromark-extension-liquid.js index 45b011a28..48a7ce40f 100644 --- a/src/language-markdown/parse/micromark/micromark-extension-liquid.js +++ b/src/language-markdown/parse/micromark/micromark-extension-liquid.js @@ -77,7 +77,7 @@ function liquidSyntax() { */ function tokenize(effects, ok, nok, mode) { const isFlow = mode === "flow"; - const { interrupt, now, parser } = this; + const { now, parser } = this; /** @type {typeof codes.rightCurlyBrace | typeof codes.percentSign} */ let closingCode; @@ -97,7 +97,7 @@ function liquidSyntax() { ? codes.percentSign : codes.rightCurlyBrace; effects.consume(code); - return isFlow && interrupt ? ok : inside; + return inside; default: return nok(code); } diff --git a/tests/format/markdown/liquid/__snapshots__/format.test.js.snap b/tests/format/markdown/liquid/__snapshots__/format.test.js.snap index c250ece2a..985a65e83 100644 --- a/tests/format/markdown/liquid/__snapshots__/format.test.js.snap +++ b/tests/format/markdown/liquid/__snapshots__/format.test.js.snap @@ -547,6 +547,163 @@ For the sake of example, the router's public address is 5.6.7.8 and its private ================================================================================ `; +exports[`issue-20083.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +proseWrap: "always" + printWidth: 80 (default) | +=====================================input====================================== +Taken from https://github.com/mdn/content/blob/3f221b9845703eb21db70cdc321f843d5c1c072b/files/en-us/webassembly/reference/javascript_interface/module/customsections_static/index.md?plain=1#L32-L33 + +If \`module\` is not a [\`WebAssembly.Module\`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module) object instance, a +{{jsxref("TypeError")}} is thrown. + +--- + +text +{% comment %} here is comment {% endcomment %} + +--- + +text +{{ comment }} here is comment {{ endcomment }} + +--- + +text +{% comment %} text + +--- + +text +{{ comment }} text + +--- + +text +{{abc}} + +--- + +text +{% tag %} + +=====================================output===================================== +Taken from +https://github.com/mdn/content/blob/3f221b9845703eb21db70cdc321f843d5c1c072b/files/en-us/webassembly/reference/javascript_interface/module/customsections_static/index.md?plain=1#L32-L33 + +If \`module\` is not a +[\`WebAssembly.Module\`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module) +object instance, a {{jsxref("TypeError")}} is thrown. + +--- + +text {% comment %} here is comment {% endcomment %} + +--- + +text {{ comment }} here is comment {{ endcomment }} + +--- + +text {% comment %} text + +--- + +text {{ comment }} text + +--- + +text +{{abc}} + +--- + +text +{% tag %} + +================================================================================ +`; + +exports[`issue-20083.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] + printWidth: 80 (default) | +=====================================input====================================== +Taken from https://github.com/mdn/content/blob/3f221b9845703eb21db70cdc321f843d5c1c072b/files/en-us/webassembly/reference/javascript_interface/module/customsections_static/index.md?plain=1#L32-L33 + +If \`module\` is not a [\`WebAssembly.Module\`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module) object instance, a +{{jsxref("TypeError")}} is thrown. + +--- + +text +{% comment %} here is comment {% endcomment %} + +--- + +text +{{ comment }} here is comment {{ endcomment }} + +--- + +text +{% comment %} text + +--- + +text +{{ comment }} text + +--- + +text +{{abc}} + +--- + +text +{% tag %} + +=====================================output===================================== +Taken from https://github.com/mdn/content/blob/3f221b9845703eb21db70cdc321f843d5c1c072b/files/en-us/webassembly/reference/javascript_interface/module/customsections_static/index.md?plain=1#L32-L33 + +If \`module\` is not a [\`WebAssembly.Module\`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module) object instance, a +{{jsxref("TypeError")}} is thrown. + +--- + +text +{% comment %} here is comment {% endcomment %} + +--- + +text +{{ comment }} here is comment {{ endcomment }} + +--- + +text +{% comment %} text + +--- + +text +{{ comment }} text + +--- + +text +{{abc}} + +--- + +text +{% tag %} + +================================================================================ +`; + exports[`unbalanced-mismatched-braces.md - {"proseWrap":"always"} format 1`] = ` ====================================options===================================== parsers: ["markdown"] diff --git a/tests/format/markdown/liquid/issue-20083.md b/tests/format/markdown/liquid/issue-20083.md new file mode 100644 index 000000000..2fce9bc69 --- /dev/null +++ b/tests/format/markdown/liquid/issue-20083.md @@ -0,0 +1,34 @@ +Taken from https://github.com/mdn/content/blob/3f221b9845703eb21db70cdc321f843d5c1c072b/files/en-us/webassembly/reference/javascript_interface/module/customsections_static/index.md?plain=1#L32-L33 + +If `module` is not a [`WebAssembly.Module`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module) object instance, a +{{jsxref("TypeError")}} is thrown. + +--- + +text +{% comment %} here is comment {% endcomment %} + +--- + +text +{{ comment }} here is comment {{ endcomment }} + +--- + +text +{% comment %} text + +--- + +text +{{ comment }} text + +--- + +text +{{abc}} + +--- + +text +{% tag %} diff --git a/website/src/pages/index.jsx b/website/src/pages/index.jsx index 470c0b072..aa811c3fe 100644 --- a/website/src/pages/index.jsx +++ b/website/src/pages/index.jsx @@ -332,7 +332,9 @@ function UsersSection() {
More than{" "} - 10 million{" "} + + 10.1 million + {" "} dependent repositories on GitHub
- + +