diff --git a/documentation/docs/04-runtime/02-context.md b/documentation/docs/04-runtime/02-context.md
index 0833d3d9bc..6314a32740 100644
--- a/documentation/docs/04-runtime/02-context.md
+++ b/documentation/docs/04-runtime/02-context.md
@@ -10,8 +10,7 @@ Most state is component-level state that lives as long as its component lives. T
The easiest way to do that is to create global state and just import that.
```ts
-/// file: state.svelte.ts
-
+/// file: state.svelte.js
export const myGlobalState = $state({
user: {
/* ... */
diff --git a/documentation/docs/04-runtime/03-lifecycle-hooks.md b/documentation/docs/04-runtime/03-lifecycle-hooks.md
index f08cbd910e..dc5465ee09 100644
--- a/documentation/docs/04-runtime/03-lifecycle-hooks.md
+++ b/documentation/docs/04-runtime/03-lifecycle-hooks.md
@@ -110,23 +110,21 @@ With runes, we can use `$effect.pre`, which behaves the same as `$effect` but ru
- [Before](/#H4sIAAAAAAAAE31WXa_bNgz9K6yL1QmWOLlrC-w6H8MeBgwY9tY9NfdBtmlbiywZkpyPBfnvo2zLcZK28AWuRPGI5OGhkEuQc4EmiL9eAskqDOLg97oOZoE9125jDigs0t6oRqfOsjap5rXd7uTO8qpW2sIFEsyVxn_qjFmcAcstar-xPN3DFXKtKgi768IVgQku0ELj3Lgs_kZjWIEGNpAzYXDlHWyJFZI1zJjeh4O5uvl_DY8oUkVeVoFuJKYls-_CGYS25Aboj0EtWNqel0wWoBoLTGZgmdgDS9zW4Uz4NsrswPHoyutN4xInkylstnBxdmIhh8m7xzqmoNE2Wq46n1RJQzEbq4g-JQSl7e-HDx-GdaTy3KD9E3lRWvj5Zu9QX1QN20dj7zyHz8s-1S6lW7Cpz3RnXTcm04hIlfdFuO8p2mQ5-3a06cqjrn559bF_2NHOnRZ5I1PLlXQNyQT-hedMHeUEDyjtdMxsa4n2eIbNhlTwhyRthaOKOmYtniwF6pwt0wXa6MBEg0OibZec27gz_dk3UrZ6hB2LLYoiv521Yd8Gt-foTrfhiCDP0lC9VUUhcDLU49Xe_9943cNvEArHfAjxeBTovvXiNpFynfEDpIIZs9kFb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jHceys8R7PMFms4HwD2lRhzeEe-EsvluSrHe2TJdo4wMTLY48XKwPzm0KGm2r5ajFtRYU4TWOY7-ddWHfxhDP0QkQhnf5PWRnVVkKnIx8fZsOb5dR16nwG4TCCRdCMphWQ7z1_DoOcp3zA2SCGbPZBa5jd0G_TRxmc36Me-mG6A7l60XIlMs8ce2-OXtrDyBItdz6qVjPadObzx-RZdV1nJjx64tXad1sz962njceOHfAzmk9JzrbXqg1lw3NkZL7vgE257t-uMDcO6attSSokpmgFqVMO2U93e_dDlzOUKsc-3t6zNZp6K9cG3sS2KGSUqiUiUmq8tNYoJwbmvpTAoXA96GyjCojI26xNglk6DpwOPm7NdRYp4ia0JL94bTqRiGB5WJxqFY37RGPoz3c6i4jP3rcUA7wmhqNywQW7om_YQ2L4UQdUBdCHSPiOQJ8bFcxHzeK0jKBY0XcV95SkCWlD9t-9eOM3TLKucauiyktJdpaPqT19ddF4wFHntsqgS-_XE01e48GMwnw02AtWZP02QyGVOkcNfk072CU4PkduZSWpVYt9SkcmJ64hPwHpWF5ziVls3wIFmmW89Y83vMeGf5PBxjcyPSkXNy10J18t3x6-a6CDtBq6SGklNKeazFyLahB3PVIGo2UbhOgGi9vKjzW_j6xVFFD17difXx5ebll0vwvkcGpn4sZ9MN3vqFYsJoL6gUuK9TcPrO_PxgzWMRfflSEr2NHPJf6lj1957rRpH8CNMG84JgHidUtXt4u_wK21LXERAgAAA==)
-```diff
+
+```svelte
--
-+
+
+------
+++++++
```
### svelte_element_invalid_this
diff --git a/packages/svelte/messages/compile-warnings/template.md b/packages/svelte/messages/compile-warnings/template.md
index 5e198c2d55..bfa75ac7f0 100644
--- a/packages/svelte/messages/compile-warnings/template.md
+++ b/packages/svelte/messages/compile-warnings/template.md
@@ -74,24 +74,27 @@ In some cases `` syntax can be used as a replacement; a lowerca
For complex component resolution logic, an intermediary, capitalized variable may be necessary. E.g. in places where `@const` can be used:
-```diff
+
+```svelte
{#each items as item}
--
-+ {@const Component = item.condition ? Y : Z}
-+
+ ------
+ +++{@const Component = item.condition ? Y : Z}+++
+ ++++++
{/each}
```
A derived value may be used in other contexts:
-```diff
+
+```svelte
--
-+
+
+------
+++++++
```
## svelte_element_invalid_this