Skip to content

fix(runtime-vapor): normalize line breaks when hydrating text - #15906

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-hydrate-text-crlf
Oct 19, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-hydrate-text-crlf

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

Hydrating vapor text that contains \r\n or \r warns "Hydration text mismatch" and logs a mismatch, even though server and client render the same string. The text usually comes from files saved with Windows line endings, e.g. Markdown content (nuxt/content#2000) or demo sources imported with ?raw and rendered as <pre><code>{{ source }}</code></pre> in VitePress themes (augma, olli), or from user text submitted through a <textarea>. The original report is #9229. Playground

The HTML parser normalizes line breaks to \n, so the server text never equals the raw client string. Vdom normalizes the client text before comparing since 6cbdf78 (#9232). Vapor routes hydrated text nodes, textContent and value through getClientText, so normalizing there covers all of them, before the existing leading-newline handling for <pre> and <textarea>.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3abea507-7b2b-4cb6-bd7c-b8460e4c2f2f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@15906
npm i https://pkg.pr.new/@vue/compiler-core@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@15906
npm i https://pkg.pr.new/@vue/compiler-dom@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@15906
npm i https://pkg.pr.new/@vue/compiler-sfc@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@15906
npm i https://pkg.pr.new/@vue/compiler-ssr@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@15906
npm i https://pkg.pr.new/@vue/compiler-vapor@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@15906
npm i https://pkg.pr.new/@vue/reactivity@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@15906
npm i https://pkg.pr.new/@vue/runtime-core@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@15906
npm i https://pkg.pr.new/@vue/runtime-dom@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@15906
npm i https://pkg.pr.new/@vue/runtime-vapor@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@15906
npm i https://pkg.pr.new/@vue/server-renderer@15906
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@15906
npm i https://pkg.pr.new/@vue/shared@15906
yarn add https://pkg.pr.new/@vue/[email protected]

vue

pnpm add https://pkg.pr.new/vue@15906
npm i https://pkg.pr.new/vue@15906
yarn add https://pkg.pr.new/[email protected]

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@15906
npm i https://pkg.pr.new/@vue/compat@15906
yarn add https://pkg.pr.new/@vue/[email protected]

commit: 69f7f04

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.4 kB 30.7 kB 27 kB
runtime-dom.global.prod.js 119 kB 44.8 kB 40.2 kB
vue.global.prod.js 180 kB 65.1 kB 58 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 54.6 kB 21.2 kB 19.4 kB
createApp 63.5 kB 24.5 kB 22.2 kB
createApp + vaporInteropPlugin 138 kB 50 kB 44.8 kB
createVaporApp 34.2 kB 13.2 kB 12.2 kB
createSSRApp 68.6 kB 26.5 kB 24.1 kB
createVaporSSRApp 41 kB (+26 B) 15.7 kB (+16 B) 14.4 kB (+15 B)
defineCustomElement 70.1 kB 26.5 kB 24.1 kB
defineVaporCustomElement 49.1 kB 18 kB 16.5 kB
overall 79.1 kB 30.1 kB 27.2 kB

@edison1105 edison1105 added the scope: vapor related to vapor mode label Oct 17, 2026
@edison1105
edison1105 merged commit 4c5ff02 into vuejs:minor Oct 19, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants