diff --git a/apps/svelte.dev/content/blog/2024-04-01-whats-new-in-svelte-april-2024.md b/apps/svelte.dev/content/blog/2024-04-01-whats-new-in-svelte-april-2024.md index 1271d3ece..28f11caae 100644 --- a/apps/svelte.dev/content/blog/2024-04-01-whats-new-in-svelte-april-2024.md +++ b/apps/svelte.dev/content/blog/2024-04-01-whats-new-in-svelte-april-2024.md @@ -28,7 +28,7 @@ Also, this month, a ton of new features have been merged into Svelte 5 to make i - `adapter-vercel` now has Skew Protection which ensures that the client and server stay in sync for any particular deployment (**@sveltejs/adapter-vercel@5.2.0**, [Docs](https://vercel.com/docs/deployments/skew-protection), [#11987](https://github.com/sveltejs/kit/pull/11987)) - `adapter-vercel`'s build output files now include framework metadata - improving observability on the platform (**@sveltejs/adapter-vercel@5.2.0**, [#11800](https://github.com/sveltejs/kit/pull/11800)) - `adapter-cloudflare` and `adapter-cloudflare-workers` now implement `adapter.emulate` which allows the adapter to emulate the Cloudflare platform during dev and preview ([#11732](https://github.com/sveltejs/kit/pull/11732)) -- **Breaking:** `adapter-node` now shuts down gracefully and supports the new `IDLE_TIMEOUT` and `SHUTDOWN_TIMEOUT` environment variables (**@sveltejs/adapter-node@5.0.1**, [Docs](/docs/kit/adapter-node#Environment-variables-SHUTDOWN-TIMEOUT), [#11653](https://github.com/sveltejs/kit/pull/11653)) +- **Breaking:** `adapter-node` now shuts down gracefully and supports the new `IDLE_TIMEOUT` and `SHUTDOWN_TIMEOUT` environment variables (**@sveltejs/adapter-node@5.0.1**, [Docs](/docs/kit/adapter-node#Environment-variables-SHUTDOWN_TIMEOUT), [#11653](https://github.com/sveltejs/kit/pull/11653)) - **Breaking:** The default value of `precompress` in `adapter-node` is now `true` - making sites faster by default (**@sveltejs/adapter-node@5.0.0**, [Docs](/docs/kit/adapter-node#Options-precompress), [#11945](https://github.com/sveltejs/kit/pull/11945)) - Google Cloud is now supported in `adapter-auto` without any additional configuration (**@sveltejs/adapter-auto@3.2.0**, [Docs](/docs/kit/adapter-auto), [#12015](https://github.com/sveltejs/kit/pull/12015)) diff --git a/apps/svelte.dev/content/blog/2024-07-01-whats-new-in-svelte-july-2024.md b/apps/svelte.dev/content/blog/2024-07-01-whats-new-in-svelte-july-2024.md index 7173f0467..34aab718a 100644 --- a/apps/svelte.dev/content/blog/2024-07-01-whats-new-in-svelte-july-2024.md +++ b/apps/svelte.dev/content/blog/2024-07-01-whats-new-in-svelte-july-2024.md @@ -24,7 +24,7 @@ Below, you'll find the highlights from the Svelte 5 release notes (now in [Relea The node and Cloudflare adapters got a few upgrades this month: -- The `BODY_SIZE_LIMIT` environment variable adds unit suffixes support to the adapter-node - making it easier to write and comprehend large byte values (**adapter-node@5.2.0**, [Docs](/docs/kit/adapter-node#Environment-variables-BODYSIZELIMIT), [#11680](https://github.com/sveltejs/kit/pull/11680)) +- The `BODY_SIZE_LIMIT` environment variable adds unit suffixes support to the adapter-node - making it easier to write and comprehend large byte values (**adapter-node@5.2.0**, [Docs](/docs/kit/adapter-node#Environment-variables-BODY_SIZE_LIMIT), [#11680](https://github.com/sveltejs/kit/pull/11680)) - Node servers can now listen to the `sveltekit:shutdown` event (replacing the more abrupt `exit`) that is emitted after the HTTP server has closed all connections (**adapter-node@5.1.0**, [Docs](/docs/kit/adapter-node#Graceful-shutdown), [#12153](https://github.com/sveltejs/kit/pull/12153)) - The Cloudflare adapter will now only throw a `_routes.json` error when the file exists but there are no configured routes in svelte.config (**adapter-cloudflare@4.5.0**, [#12360](https://github.com/sveltejs/kit/pull/12360)) diff --git a/apps/svelte.dev/content/docs/kit/25-build-and-deploy/40-adapter-node.md b/apps/svelte.dev/content/docs/kit/25-build-and-deploy/40-adapter-node.md index 71dc8efd6..0a7c553c4 100644 --- a/apps/svelte.dev/content/docs/kit/25-build-and-deploy/40-adapter-node.md +++ b/apps/svelte.dev/content/docs/kit/25-build-and-deploy/40-adapter-node.md @@ -187,7 +187,7 @@ By default `adapter-node` gracefully shuts down the HTTP server when a `SIGTERM` 1. reject new requests ([`server.close`](https://nodejs.org/api/http.html#serverclosecallback)) 2. wait for requests that have already been made but not received a response yet to finish and close connections once they become idle ([`server.closeIdleConnections`](https://nodejs.org/api/http.html#servercloseidleconnections)) -3. and finally, close any remaining connections that are still active after [`SHUTDOWN_TIMEOUT`](#Environment-variables-SHUTDOWN-TIMEOUT) seconds. ([`server.closeAllConnections`](https://nodejs.org/api/http.html#servercloseallconnections)) +3. and finally, close any remaining connections that are still active after [`SHUTDOWN_TIMEOUT`](#Environment-variables-SHUTDOWN_TIMEOUT) seconds. ([`server.closeAllConnections`](https://nodejs.org/api/http.html#servercloseallconnections)) > [!NOTE] If you want to customize this behaviour you can use a [custom server](#Custom-server). @@ -205,7 +205,7 @@ The parameter `reason` has one of the following values: - `SIGINT` - shutdown was triggered by a `SIGINT` signal - `SIGTERM` - shutdown was triggered by a `SIGTERM` signal -- `IDLE` - shutdown was triggered by [`IDLE_TIMEOUT`](#Environment-variables-IDLE-TIMEOUT) +- `IDLE` - shutdown was triggered by [`IDLE_TIMEOUT`](#Environment-variables-IDLE_TIMEOUT) ## Socket activation @@ -215,7 +215,7 @@ Most Linux operating systems today use a modern process manager called systemd t To take advantage of socket activation follow these steps. -1. Run your app as a [systemd service](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html). It can either run directly on the host system or inside a container (using Docker or a systemd portable service for example). If you additionally pass an [`IDLE_TIMEOUT`](#Environment-variables-IDLE-TIMEOUT) environment variable to your app it will gracefully shutdown if there are no requests for `IDLE_TIMEOUT` seconds. systemd will automatically start your app again when new requests are coming in. +1. Run your app as a [systemd service](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html). It can either run directly on the host system or inside a container (using Docker or a systemd portable service for example). If you additionally pass an [`IDLE_TIMEOUT`](#Environment-variables-IDLE_TIMEOUT) environment variable to your app it will gracefully shutdown if there are no requests for `IDLE_TIMEOUT` seconds. systemd will automatically start your app again when new requests are coming in. ```ini /// file: /etc/systemd/system/myapp.service diff --git a/packages/site-kit/src/lib/markdown/utils.ts b/packages/site-kit/src/lib/markdown/utils.ts index 0fa108c14..e4a06084b 100644 --- a/packages/site-kit/src/lib/markdown/utils.ts +++ b/packages/site-kit/src/lib/markdown/utils.ts @@ -19,11 +19,11 @@ export const SHIKI_LANGUAGE_MAP = { */ export function clean(markdown: string) { return markdown - .replace(/\*\*(.+?)\*\*/g, '$1') // bold - .replace(/_(.+?)_/g, '$1') // Italics - .replace(/\*(.+?)\*/g, '$1') // Italics - .replace(/`(.+?)`/g, '$1') // Inline code - .replace(/~~(.+?)~~/g, '$1') // Strikethrough + .replace(/(?:^|b)\*\*(.+?)\*\*(?:\b|$)/g, '$1') // bold + .replace(/(?:^|b)_(.+?)_(?:\b|$)/g, '$1') // Italics + .replace(/(?:^|b)\*(.+?)\*(?:\b|$)/g, '$1') // Italics + .replace(/(?:^|b)`(.+?)`(?:\b|$)/g, '$1') // Inline code + .replace(/(?:^|b)~~(.+?)~~(?:\b|$)/g, '$1') // Strikethrough .replace(/\[(.+?)\]\(.+?\)/g, '$1') // Link .replace(/\n/g, ' ') // New line .replace(/ {2,}/g, ' ') @@ -36,7 +36,7 @@ export const slugify = (str: string) => { .replace(/&.+?;/g, '') .replace(/<\/?.+?>/g, '') .replace(/\.\.\./g, '') - .replace(/[^a-zA-Z0-9-$(.):']/g, '-') + .replace(/[^a-zA-Z0-9-$(.):'_]/g, '-') .replace(/-{2,}/g, '-') .replace(/^-/, '') .replace(/-$/, '');