Skip to content

docs/migration guide: incorrect code diff highlight generated #14481

@leumasme

Description

@leumasme

Describe the bug

On the migration guide page of the docs, this code can be seen with visual highlights on added/removed code, explaining the code changes between $: and runes.
image
This highlighting is incorrect, the "count" variable should not be highlighted as added. The green highlight should end earlier.
In the .md file backing this docs page (both on github and when inspecting browser requests), the highlight markers seem to be correctly placed:
https://github.com/sveltejs/svelte/blob/main/documentation/docs/07-misc/07-v5-migration-guide.md?plain=1#L35
---$:--- +++const+++ double = +++$derived(+++count * 2+++)+++;
The count variable is not between the +++ highlighting markers, and should thus already not be highlighted in green; something appears to be going wrong in creating the highlights in the browser based on the md file.

Reproduction

https://svelte.dev/docs/svelte/v5-migration-guide#Reactivity-syntax-changes-$:-$derived-$effect

Logs

No response

System Info

Chrome 131.0.6778.86

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions