From 791acc70484598d6be37d029e028db013ac70d94 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 30 Sep 2025 13:42:03 -0400 Subject: [PATCH 1/3] feat: enhance remark configuration with directive support - Added `remark-directive` plugin to support custom directives in markdown. - Introduced a new function `directiveColonSafe` to handle directive padding correctly. - Updated `.remarkrc.mjs` and package files to include the new dependency. - Improved documentation formatting by ensuring proper indentation for admonitions. --- .remarkrc.mjs | 58 +++++++++++++++++++ .../optimize-storage/zfs-storage.mdx | 2 - .../set-up-unraid/configure-your-array.mdx | 4 -- .../deploy-and-configure-unraid-os.mdx | 2 - .../getting-started/what-is-unraid.mdx | 6 -- .../advanced-tools/command-line-interface.mdx | 4 -- .../advanced-tools/wake-on-lan.mdx | 3 +- .../changing-the-flash-device.mdx | 2 +- .../securing-your-connection.mdx | 16 +---- .../system-crashes-and-stability.mdx | 2 - .../diagnostics/udma-crc-errors.mdx | 2 - docs/unraid-os/troubleshooting/faq.mdx | 16 ++--- .../troubleshooting/licensing-faq.mdx | 6 -- .../overview-and-system-prep.mdx | 2 - .../partials/windows-virtio-manual.mdx | 4 +- .../unraid-as-a-vm.mdx | 2 - .../vm-conversion-and-migration.mdx | 8 --- .../create-virtual-machines/vm-setup.mdx | 11 +--- .../windows-on-a-vm.mdx | 4 -- .../manage-storage/apple-time-machine.mdx | 4 +- .../manage-storage/array-configuration.mdx | 16 +---- .../remove-data-disk-parity-preserve.mdx | 4 -- .../using-unraid-to/manage-storage/shares.mdx | 8 --- .../run-docker-containers/overview.mdx | 2 - package-lock.json | 1 + package.json | 4 +- scripts/format-crowdin-spacing.js | 40 ++++++++----- 27 files changed, 100 insertions(+), 133 deletions(-) diff --git a/.remarkrc.mjs b/.remarkrc.mjs index d56d3c2326..fc9a8107f1 100644 --- a/.remarkrc.mjs +++ b/.remarkrc.mjs @@ -2,6 +2,7 @@ import remarkFrontmatter from 'remark-frontmatter' import remarkGfm from 'remark-gfm' import remarkMdx from 'remark-mdx' +import remarkDirective from 'remark-directive' import remarkPresetLintRecommended from 'remark-preset-lint-recommended' import remarkLintListItemIndent from 'remark-lint-list-item-indent' import remarkLintOrderedListMarkerStyle from 'remark-lint-ordered-list-marker-style' @@ -23,6 +24,8 @@ import jsxContentSpacing from './remark-jsx-spacing.js' const plugins = [ // MDX support remarkMdx, + remarkDirective, + directiveColonSafe, remarkFrontmatter, remarkGfm, @@ -79,3 +82,58 @@ const remarkConfig = { }; export default remarkConfig + +function directiveColonSafe() { + const data = this.data() + const extensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []) + + for (const extension of extensions) { + if ( + extension && + typeof extension === 'object' && + 'handlers' in extension && + extension.handlers && + 'containerDirective' in extension.handlers && + Array.isArray(extension.unsafe) + ) { + extension.unsafe = extension.unsafe.filter( + (rule) => rule.character !== ':' + ) + + wrapContainerDirectiveHandler(extension) + } + } + + data.toMarkdownExtensions = extensions +} + +function wrapContainerDirectiveHandler(extension) { + const {containerDirective} = extension.handlers + + if (typeof containerDirective !== 'function') { + return + } + + extension.handlers.containerDirective = function wrappedContainerDirective( + node, + parent, + state, + info + ) { + const previous = state.bulletLastUsed + state.bulletLastUsed = undefined + + try { + const output = containerDirective(node, parent, state, info) + return collapseDirectivePadding(output) + } finally { + state.bulletLastUsed = previous + } + } +} + +function collapseDirectivePadding(value) { + return value + .replace(/(^|\n)([ \t]*:::[^\n]*?)\n\n/g, '$1$2\n') + .replace(/\n\n([ \t]*:::)/g, '\n$1') +} diff --git a/docs/unraid-os/advanced-configurations/optimize-storage/zfs-storage.mdx b/docs/unraid-os/advanced-configurations/optimize-storage/zfs-storage.mdx index 47a119a335..5eb32a2d5b 100644 --- a/docs/unraid-os/advanced-configurations/optimize-storage/zfs-storage.mdx +++ b/docs/unraid-os/advanced-configurations/optimize-storage/zfs-storage.mdx @@ -263,9 +263,7 @@ Unraid can import %%ZFS|zfs%% pools created on other platforms with minimal hass 5. **Finish and start array:** Click **Done**, then start the %%array|array%%. :::info[Automatic detection] - Unraid will automatically detect and import the %%ZFS|zfs%% pool. Support vdevs (like log, cache/L2ARC, special/dedup) are listed under **Subpools** in the %%WebGUI|web-gui%%. There is no need to add subpools separately after initiating the import. Unraid will automatically import them alongside the main data disks when all required drives are assigned. - ::: After importing, running a %%scrub|scrub%% is highly recommended to verify data integrity. diff --git a/docs/unraid-os/getting-started/set-up-unraid/configure-your-array.mdx b/docs/unraid-os/getting-started/set-up-unraid/configure-your-array.mdx index bf01239448..a954ee6e75 100644 --- a/docs/unraid-os/getting-started/set-up-unraid/configure-your-array.mdx +++ b/docs/unraid-os/getting-started/set-up-unraid/configure-your-array.mdx @@ -46,15 +46,11 @@ Unraid OS uses drives for various purposes: To safeguard cached data, assign more than one device to the %%cache pool|cache-pool%%. A single device does not offer protection from data loss. %%Cache pools|cache-pool%% can be expanded on demand. :::warning - SSD support is experimental in the %%array|array%%. Some SSDs may not perform well due to variations in %%TRIM/Discard|trim-discard%% implementation, which could lead to undesirable results. This does not apply to %%cache pools|cache-pool%%. [Learn more about filesystem options here](../../using-unraid-to/manage-storage/file-systems.mdx). - ::: :::note - SSD-based pools are optimal for applications and virtual machines, leveraging SSD performance for faster interactions. [Learn more about running applications here](../../using-unraid-to/run-docker-containers/overview.mdx). - ::: diff --git a/docs/unraid-os/getting-started/set-up-unraid/deploy-and-configure-unraid-os.mdx b/docs/unraid-os/getting-started/set-up-unraid/deploy-and-configure-unraid-os.mdx index bd1f87aa04..7a8e10d7c1 100644 --- a/docs/unraid-os/getting-started/set-up-unraid/deploy-and-configure-unraid-os.mdx +++ b/docs/unraid-os/getting-started/set-up-unraid/deploy-and-configure-unraid-os.mdx @@ -105,11 +105,9 @@ Before deploying Unraid OS, it's important to verify your system's BIOS and stor For further assistance, visit the [Unraid general support forum](https://forums.unraid.net/). :::important - Many motherboards limit boot device selection to 12 hard drives. If your USB flash drive is recognized as a hard drive, you may not be able to boot from it after installing 12 physical hard drives. Configure the BIOS to treat the flash drive as a removable device whenever possible. If using an add-on HBA, you may be able to disable INT 13h support to prevent its connected drives from appearing in the bootable devices list, helping to stay within the 12-drive limit. - ::: diff --git a/docs/unraid-os/getting-started/what-is-unraid.mdx b/docs/unraid-os/getting-started/what-is-unraid.mdx index 61d293c9be..4ffcbc2918 100644 --- a/docs/unraid-os/getting-started/what-is-unraid.mdx +++ b/docs/unraid-os/getting-started/what-is-unraid.mdx @@ -112,9 +112,7 @@ Unraid features a [user-friendly web interface](./explore-the-user-interface/tou Docker containers allow you to run applications in isolated, lightweight environments without the overhead associated with %%virtual machines|vm%%. Unraid simplifies the use of Docker by providing access to thousands of pre-configured apps through [Docker Hub](https://hub.docker.com/) and [Community Applications](../using-unraid-to/run-docker-containers/community-applications.mdx). This containerized approach enables Unraid users to run multiple applications simultaneously without compatibility issues. It also helps keep the system organized by using self-contained application packages and makes it easy to enhance server capabilities through Docker's ecosystem. :::note - For advanced Docker settings, check out [Run Docker Containers](../using-unraid-to/run-docker-containers/managing-and-customizing-containers.mdx). - ::: @@ -125,9 +123,7 @@ Unraid features a [user-friendly web interface](./explore-the-user-interface/tou Unraid functions as a virtualization host, using a %%hypervisor|hypervisor%% to securely allocate resources to virtualized guests. This allows you to run various applications in isolated environments, going beyond just network-attached storage. :::tip - To use hardware virtualization in Unraid, ensure your CPU, chipset, BIOS, and device drivers are compatible. A full list of requirements is available in the [VM setup guide](../using-unraid-to/create-virtual-machines/overview-and-system-prep.mdx). If your server doesn't meet these requirements, the %%VMs|vm%% menu will be disabled in the Unraid %%WebGUI|web-gui%%. - :::
@@ -188,9 +184,7 @@ Unraid features a [user-friendly web interface](./explore-the-user-interface/tou For %%VM|vm%% setup steps, check out [Create virtual machines](../using-unraid-to/create-virtual-machines/overview-and-system-prep.mdx). :::caution - %%GPU passthrough|gpu-passthrough%% requires compatible hardware (see [VM setup](../using-unraid-to/create-virtual-machines/vm-setup.mdx)). - :::
diff --git a/docs/unraid-os/system-administration/advanced-tools/command-line-interface.mdx b/docs/unraid-os/system-administration/advanced-tools/command-line-interface.mdx index 8f7ca05e5a..d86ddd6bd9 100644 --- a/docs/unraid-os/system-administration/advanced-tools/command-line-interface.mdx +++ b/docs/unraid-os/system-administration/advanced-tools/command-line-interface.mdx @@ -169,9 +169,7 @@ This command provides a real-time process and resource monitor. - Use arrow keys to scroll, and `k` to terminate processes. :::tip - Consider using `htop` for a more user-friendly interface with enhanced controls. - ::: @@ -190,9 +188,7 @@ This command shows memory usage statistics. This displays RAM usage in a human-readable format. The `-h` flag means sizes will show in KB, MB, or GB instead of bytes. :::tip[Understand the output] - A low "available" memory reading doesn’t necessarily indicate a problem—Linux aggressively caches data for performance. - ::: diff --git a/docs/unraid-os/system-administration/advanced-tools/wake-on-lan.mdx b/docs/unraid-os/system-administration/advanced-tools/wake-on-lan.mdx index dd5c8dd071..82880422d8 100644 --- a/docs/unraid-os/system-administration/advanced-tools/wake-on-lan.mdx +++ b/docs/unraid-os/system-administration/advanced-tools/wake-on-lan.mdx @@ -80,16 +80,15 @@ The plugin manages most sleep configuration options. ``` :::caution[Persistence] - WoL settings configured manually are **not persistent** across reboots by default. To make them permanent: 1. Create a `go` file on your flash drive at `/boot/config/go`. + 2. Add this line: ``` /sbin/ethtool -s eth0 wol g ``` - ::: diff --git a/docs/unraid-os/system-administration/maintain-and-update/changing-the-flash-device.mdx b/docs/unraid-os/system-administration/maintain-and-update/changing-the-flash-device.mdx index a7c415844e..6dd4392452 100644 --- a/docs/unraid-os/system-administration/maintain-and-update/changing-the-flash-device.mdx +++ b/docs/unraid-os/system-administration/maintain-and-update/changing-the-flash-device.mdx @@ -53,11 +53,11 @@ For more guidance on selecting the best flash device for Unraid, check out [Spac - Avoid second-hand or previously used drives. - Test the new drive on your server before transferring your license. - Be cautious of counterfeit products, even from well-known brands. - :::note The [forum announcement on counterfeit SanDisk drives](https://forums.unraid.net/topic/119052-psa-on-sandisk-usbs/) from January 2022 confirms SanDisk is not recommended due to counterfeit devices and manufacturing changes resulting in non-unique GUIDs. This affects both counterfeit and legitimate SanDisk drives. +::: ::: --- diff --git a/docs/unraid-os/system-administration/secure-your-server/securing-your-connection.mdx b/docs/unraid-os/system-administration/secure-your-server/securing-your-connection.mdx index fc3a966f2d..a78ab94af5 100644 --- a/docs/unraid-os/system-administration/secure-your-server/securing-your-connection.mdx +++ b/docs/unraid-os/system-administration/secure-your-server/securing-your-connection.mdx @@ -61,9 +61,7 @@ Below are the main ways to access your Unraid %%WebGUI|web-gui%%, depending on y 5. Click **Apply**. :::warning - Anyone on your network can intercept data sent over HTTP. Use HTTPS whenever possible. - ::: @@ -86,9 +84,7 @@ Below are the main ways to access your Unraid %%WebGUI|web-gui%%, depending on y 5. Click **Apply**. :::important - Browsers will show a certificate error. All traffic is still encrypted after you accept the warning. - ::: @@ -124,15 +120,11 @@ Below are the main ways to access your Unraid %%WebGUI|web-gui%%, depending on y - If you install the [Unraid Connect plugin](../../../unraid-connect/overview-and-setup.mdx), it will also be shown on the Connect dashboard. :::info - The myunraid.net certificate is trusted by browsers and does not display warnings. The URL uses your LAN IP address with dots changed to dashes, plus a unique 40-character %%hash|hash%% assigned to your server. - ::: :::tip[Fallback access] - If %%DNS|dns-name-resolution%% resolution becomes unavailable (e.g., your Internet goes down), you can use the local URLs with your server name or IP address as backup access methods. - ::: @@ -155,7 +147,6 @@ Below are the main ways to access your Unraid %%WebGUI|web-gui%%, depending on y If you install the [Unraid Connect plugin](../../../unraid-connect/overview-and-setup.mdx), it will also be shown on the Connect dashboard. :::caution - If %%DNS|dns-name-resolution%% resolution becomes unavailable (e.g., your Internet connection goes down), you will not be able to access the %%WebGUI|web-gui%% using the Myunraid.net URL. To regain access: @@ -164,7 +155,6 @@ Below are the main ways to access your Unraid %%WebGUI|web-gui%%, depending on y - Run `use_ssl no` to switch to HTTP (`http://[servername].[localTLD]` or `http://[ipaddress]`). - Run `use_ssl yes` to switch to HTTPS using a self-signed certificate (`https://[servername].[localTLD]` or `https://[ipaddress]`). See [HTTPS with a self-signed certificate](#https-with-self-signed-certificate) above for more details. - Once %%DNS|dns-name-resolution%% is restored, set **Use SSL/TLS** back to *Strict* for full security. - ::: @@ -177,10 +167,8 @@ When you access `http://[servername].[localTLD]`, the redirect behavior depends - **Strict**: You will be redirected to `https://[lan-ip].[hash].myunraid.net`. :::note - This can make local access difficult if %%DNS|dns-name-resolution%% is unavailable. See the caution under [HTTPS with Myunraid.net certificate and with no fallback URL](#https-with-myunraidnet-certificate-and-with-no-fallback-url). - -::: + ::: - **Yes**: You will be redirected to `https://[servername].[localTLD]`. This will still work even if your internet connection is down. @@ -227,9 +215,7 @@ If your certificate is invalid or does not match the server's URL, Unraid will d 7. Optionally, enable [Unraid Connect remote access](../../../unraid-connect/remote-access.mdx) for secure, browser-trusted remote management. :::tip - For wildcard certificates, ensure the certificate's Subject Alternative Name or Subject field contains `*.[localTLD]` where `[localTLD]` is the exact value you entered in the **Local TLD** field in **Management Access**. - ::: diff --git a/docs/unraid-os/troubleshooting/common-issues/system-crashes-and-stability.mdx b/docs/unraid-os/troubleshooting/common-issues/system-crashes-and-stability.mdx index c5a891e19a..ea790c5cec 100644 --- a/docs/unraid-os/troubleshooting/common-issues/system-crashes-and-stability.mdx +++ b/docs/unraid-os/troubleshooting/common-issues/system-crashes-and-stability.mdx @@ -220,10 +220,8 @@ System stability typically depends on: Keeping your system firmware current helps prevent unexpected crashes and unlocks new hardware features. :::tip[Recommendations] - - Use manufacturer utilities for risk-free updates, such as [ASUS Armoury Crate](https://www.asus.com/supportonly/armoury%20crate/helpdesk_download/), [Gigabyte @BIOS](https://www.gigabyte.com/Support/Consumer/Download), or [MSI Center](https://www.msi.com/Landing/MSI-Center). - Check your motherboard's BIOS settings for automatic update options if available. - ::: diff --git a/docs/unraid-os/troubleshooting/diagnostics/udma-crc-errors.mdx b/docs/unraid-os/troubleshooting/diagnostics/udma-crc-errors.mdx index baa409e6de..c9d6d912b4 100644 --- a/docs/unraid-os/troubleshooting/diagnostics/udma-crc-errors.mdx +++ b/docs/unraid-os/troubleshooting/diagnostics/udma-crc-errors.mdx @@ -142,9 +142,7 @@ If %%CRC errors|crc-errors%% continue after addressing cabling and power, furthe - Maintains monitoring of the underlying problem :::important - Acknowledging a warning doesn't fix the underlying issue - it just tells Unraid you're aware of it. You should still investigate and resolve the root cause of the %%CRC errors|crc-errors%%. - ::: diff --git a/docs/unraid-os/troubleshooting/faq.mdx b/docs/unraid-os/troubleshooting/faq.mdx index 0f1e06c393..34677957c4 100644 --- a/docs/unraid-os/troubleshooting/faq.mdx +++ b/docs/unraid-os/troubleshooting/faq.mdx @@ -138,9 +138,7 @@ If you need help with Unraid OS, you have several support options: Refer to [Reset your password](../system-administration/secure-your-server/user-management.mdx#reset-your-password). :::note - If you’re using encrypted drives and forget the encryption password, data recovery isn't possible - there is no backdoor. - ::: @@ -161,11 +159,12 @@ If you need help with Unraid OS, you have several support options: 7. Wipe existing filesystems from each data drive: :::danger[Critical: Destructive Operation] - **This step will permanently erase ALL data on the specified drive(s) and is IRREVERSIBLE!** - **Verify you have backups** of any data you need before proceeding + - **Double-check the device identifier** in the WebGUI or with `lsblk` before running this command + - **Ensure you're targeting the correct drive** - data loss from the wrong drive cannot be recovered For each data drive, run: @@ -176,7 +175,7 @@ If you need help with Unraid OS, you have several support options: Replace `X` with the correct drive letter (e.g., sda, sdb, sdc) - ::: +::: 8. Continue with the normal Unraid setup and configuration. @@ -293,10 +292,9 @@ If you need help with Unraid OS, you have several support options: MBR (Master Boot Record) partitioning supports disks up to 2TB and only allows a maximum of four primary partitions. On the other hand, GPT (%%GUID|guid%% Partition Table) can handle much larger disks and nearly unlimited partitions. Converting to GPT is advisable if you work with larger drives or want better partition management. :::important[Use **Maintenance Mode**] - Before starting the conversion process, put your %%array|array%% into **Maintenance Mode**. This step ensures no writes occur during the conversion, protecting your data. - ::: +

Conversion process

1. Ensure you have a valid %%parity|parity%% and a current backup of your flash drive. @@ -311,13 +309,11 @@ If you need help with Unraid OS, you have several support options: This process keeps your data safe while changing the partitioning style. :::note[Additional notes] - - **Partitioning is automatic**: Unraid automatically chooses the partitioning style based on drive size: - **2TB or smaller**: Always uses MBR partitioning - **Larger than 2TB**: Always uses GPT partitioning - Starting with Unraid OS 6.9, partition 1 starts at 32KiB for rotational devices and 1MiB for non-rotational devices, regardless of the partition style. - Always [back up your flash drive](../system-administration/secure-your-server/secure-your-flash-drive.mdx#backups) before starting this conversion process. - ::: @@ -336,9 +332,7 @@ If you need help with Unraid OS, you have several support options: Yes. The **br0** bridge is a Linux network bridge allowing Docker containers and %%VM|vm%%s to connect directly to your local area network (LAN) with their IP addresses. It acts as a virtual network switch that connects your physical network interface to the virtual interfaces used by containers and %%VM|vm%%s. :::note - Disabling br0 means that %%VMs|vm%% and Docker containers will not have direct access to the LAN and may lose some advanced networking features. - ::: @@ -439,9 +433,7 @@ If you need help with Unraid OS, you have several support options: If you need more time with your [30-day free trial](https://unraid.net/download) of Unraid, you can extend it. Once your original trial expires, stop the %%array|array%% and go to the **Registration** page. You should see a button that allows you to request a 15-day extension. You can do this twice for a total of 60 days before you need to purchase a license. :::important - You must use the same USB flash device to continue your trial. Changing the flash device will require starting a new trial from scratch. - ::: diff --git a/docs/unraid-os/troubleshooting/licensing-faq.mdx b/docs/unraid-os/troubleshooting/licensing-faq.mdx index 14b3efce47..902ac85c71 100644 --- a/docs/unraid-os/troubleshooting/licensing-faq.mdx +++ b/docs/unraid-os/troubleshooting/licensing-faq.mdx @@ -84,15 +84,11 @@ This page contains frequently asked questions about Unraid OS licensing. For gen 6. Your registration key will be emailed to you along with installation instructions. :::important - Activation codes are one-time use for generating your Unraid license key file. - ::: :::note[Instructional Video] - Watch the [Activation Code Instructional Video](https://www.loom.com/share/3ceb40440240474aaa80a0b7e3e69cb2) for step-by-step guidance. - ::: @@ -259,9 +255,7 @@ This page contains frequently asked questions about Unraid OS licensing. For gen The first transfer can be done at any time, while subsequent transfers are allowed once every 12 months using the automated system. If you need to transfer your license again before the 12-month period, contact Unraid support with your old and new USB %%GUID|guid%%s for manual assistance. :::tip - Routinely back up your USB device using [Unraid Connect](../../unraid-connect/overview-and-setup.mdx) to simplify recovery and avoid data loss. - ::: diff --git a/docs/unraid-os/using-unraid-to/create-virtual-machines/overview-and-system-prep.mdx b/docs/unraid-os/using-unraid-to/create-virtual-machines/overview-and-system-prep.mdx index bd9033e8c2..cd176133a3 100644 --- a/docs/unraid-os/using-unraid-to/create-virtual-machines/overview-and-system-prep.mdx +++ b/docs/unraid-os/using-unraid-to/create-virtual-machines/overview-and-system-prep.mdx @@ -53,9 +53,7 @@ For a list of operating systems tested with Unraid, see the [%%VM|vm%% Setup](./ - %%VNC|vnc-session%%: Unraid features a built-in NoVNC client for easy browser-based access to %%VMs|vm%%, with the option to use external %%VNC clients|vnc-session%% as needed. :::tip - Most users don’t need to interact directly with these technologies, but understanding what goes on “under the hood” can be incredibly useful for advanced troubleshooting and customization. For more detailed information, check out the official documentation for [KVM](https://www.linux-kvm.org/page/Main_Page), [QEMU](https://www.qemu.org/), [Libvirt](https://libvirt.org/), and [VirtIO](https://www.linux-kvm.org/page/Virtio). - ::: diff --git a/docs/unraid-os/using-unraid-to/create-virtual-machines/partials/windows-virtio-manual.mdx b/docs/unraid-os/using-unraid-to/create-virtual-machines/partials/windows-virtio-manual.mdx index 435b9248ec..d4dc99c420 100644 --- a/docs/unraid-os/using-unraid-to/create-virtual-machines/partials/windows-virtio-manual.mdx +++ b/docs/unraid-os/using-unraid-to/create-virtual-machines/partials/windows-virtio-manual.mdx @@ -1,10 +1,8 @@ 1. Download the [latest stable VirtIO drivers ISO](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso) and save it to your Unraid `isos` share. :::tip[Verify download integrity] - Download the [CHECKSUM file](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/CHECKSUM) from the same directory to verify the ISO's integrity. This helps ensure your download is complete and hasn't been tampered with. - -::: + ::: 2. Edit your %%VM|vm%% settings to point to the new ISO in the `isos` share. diff --git a/docs/unraid-os/using-unraid-to/create-virtual-machines/unraid-as-a-vm.mdx b/docs/unraid-os/using-unraid-to/create-virtual-machines/unraid-as-a-vm.mdx index a76ef99bff..9f94fcedac 100644 --- a/docs/unraid-os/using-unraid-to/create-virtual-machines/unraid-as-a-vm.mdx +++ b/docs/unraid-os/using-unraid-to/create-virtual-machines/unraid-as-a-vm.mdx @@ -93,9 +93,7 @@ To get Unraid up and running as a %%VM|vm%%: 12. Under **USB devices**, select the flash drive by **manufacturer**, not label. :::important - The %%VM|vm%%'s flash drive must be from a different manufacturer than the host's boot drive. If they match, the %%VM|vm%% drive won't be visible. - ::: diff --git a/docs/unraid-os/using-unraid-to/create-virtual-machines/vm-conversion-and-migration.mdx b/docs/unraid-os/using-unraid-to/create-virtual-machines/vm-conversion-and-migration.mdx index c1189ca281..8358036d5b 100644 --- a/docs/unraid-os/using-unraid-to/create-virtual-machines/vm-conversion-and-migration.mdx +++ b/docs/unraid-os/using-unraid-to/create-virtual-machines/vm-conversion-and-migration.mdx @@ -334,9 +334,7 @@ To convert a Windows VM from %%Xen|xen-hvm%% to %%KVM|kvm%%, follow these steps. - If it doesn't, skip to the step about rebooting into %%KVM|kvm%% mode. :::tip - If you are not using GPLPV drivers, you can skip the next several steps and continue from the rebooting into %%KVM|kvm%% mode section. - ::: @@ -359,9 +357,7 @@ To convert a Windows VM from %%Xen|xen-hvm%% to %%KVM|kvm%%, follow these steps. After the reboot, purge all %%Xen|xen-hvm%% GPLPV drivers from your system using the comprehensive manual removal process documented in the [Xen Project Wiki](https://wiki.xenproject.org/wiki/Xen_Windows_GPLPV). :::caution - GPLPV removal requires extensive registry editing and manual file deletion. Follow the Xen Project Wiki instructions **exactly** as written, as errors can cause system instability or boot failures. - ::: @@ -406,9 +402,7 @@ To convert a Windows VM from %%Xen|xen-hvm%% to %%KVM|kvm%%, follow these steps. - Click **Update**. :::tip[Why the temporary disk?] - The 1MB temporary disk forces Unraid to assign the primary disk as `hda` (IDE) instead of `vda` (%%VirtIO|virtio%%), allowing Windows to boot without %%VirtIO|virtio%% drivers initially. This temporary disk will be removed after the driver installation. - ::: @@ -453,13 +447,11 @@ To convert a Windows VM from %%Xen|xen-hvm%% to %%KVM|kvm%%, follow these steps. - Click **Update** and reboot the VM. :::tip[Driver troubleshooting] - If you notice errors on devices after migration: 1. Reinstall the %%VirtIO|virtio%% drivers from the ISO. 2. Check for Windows updates, which may provide newer drivers. 3. Visit the [Red Hat VirtIO Drivers](https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/) page for the latest versions. - ::: diff --git a/docs/unraid-os/using-unraid-to/create-virtual-machines/vm-setup.mdx b/docs/unraid-os/using-unraid-to/create-virtual-machines/vm-setup.mdx index 14c9c80dd7..251062f3f2 100644 --- a/docs/unraid-os/using-unraid-to/create-virtual-machines/vm-setup.mdx +++ b/docs/unraid-os/using-unraid-to/create-virtual-machines/vm-setup.mdx @@ -182,9 +182,7 @@ Unraid now supports advanced GPU sharing via `VirGL` and `QXL` for Linux %%VMs|v - **OVMF**: %%UEFI|uefi%% BIOS required for Windows 8+, most modern Linux distros, and %%GPU passthrough|gpu-passthrough%%. :::note - BIOS type can only be set when creating a new %%VM|vm%%. - ::: **Hyper-V extensions:** @@ -351,10 +349,9 @@ This section covers advanced topics and solutions for common issues when managin 6. The new capacity is now set. :::note - You cannot shrink a %%vDisk|vdisk%% from the Unraid GUI; only expansion is supported. - ::: +

Expanding the partition in your guest OS

After resizing the %%vDisk|vdisk%%, start your %%VM|vm%%. You must expand the partition within the guest operating system to use the new space: @@ -375,9 +372,7 @@ This section covers advanced topics and solutions for common issues when managin Adjust device names as needed for your setup. :::tip - Always back up your %%VM|vm%% before making disk changes. - ::: @@ -400,9 +395,7 @@ This section covers advanced topics and solutions for common issues when managin The %%VM|vm%% should now continue booting into your OS. :::tip - If this happens frequently, check your VM’s boot order and ensure the correct %%vDisk|vdisk%% or ISO is set as the primary boot device in the VM settings. - ::: @@ -448,9 +441,7 @@ This section covers advanced topics and solutions for common issues when managin - Only use this if you fully trust your %%VM|vm%% guests. :::note - For detailed %%IOMMU|iommu%% group explanations, we recommend checking out [Alex Williamson’s blog](http://vfio.blogspot.com/2014/08/iommu-groups-inside-and-out.html). - ::: diff --git a/docs/unraid-os/using-unraid-to/create-virtual-machines/windows-on-a-vm.mdx b/docs/unraid-os/using-unraid-to/create-virtual-machines/windows-on-a-vm.mdx index b5f3e97306..8716698c28 100644 --- a/docs/unraid-os/using-unraid-to/create-virtual-machines/windows-on-a-vm.mdx +++ b/docs/unraid-os/using-unraid-to/create-virtual-machines/windows-on-a-vm.mdx @@ -197,9 +197,7 @@ RDP is not available on Windows Home editions. Always set a secure password for 4. From your client device, use a Microsoft RDP client to connect to the **IP address of the %%VM|vm%%** (not the Unraid server). :::tip - Official Microsoft RDP clients are available for Windows, Mac, Android, and iOS. Make sure your %%VM|vm%% is on a network bridge that allows LAN access. - ::: @@ -212,9 +210,7 @@ If you're having trouble with HDMI audio in a Windows %%VM|vm%% that uses %%GPU How to enable MSI interrupts - Click to expand/collapse :::caution - Back up your %%VM|vm%% before making any registry changes. Incorrect modifications can cause system instability. - ::: 1. **Verify MSI capability:** diff --git a/docs/unraid-os/using-unraid-to/manage-storage/apple-time-machine.mdx b/docs/unraid-os/using-unraid-to/manage-storage/apple-time-machine.mdx index d125866320..cf5a7b5505 100644 --- a/docs/unraid-os/using-unraid-to/manage-storage/apple-time-machine.mdx +++ b/docs/unraid-os/using-unraid-to/manage-storage/apple-time-machine.mdx @@ -15,11 +15,11 @@ Apple’s Time Machine is a backup tool that comes with every Mac. It makes it e This guide applies to macOS Ventura (13.x), Sonoma (14.x), and Sequoia (15.x) versions. Some features, such as %%SMB|samba%% enhancements and Time Machine support over %%SMB|samba%%, require macOS versions that support these protocols. For the best results, keep your Mac updated to the latest version of macOS that is compatible with your hardware. - :::caution[macOS Sequoia (15.x) considerations] Some users report intermittent issues with Time Machine and network shares on macOS Sequoia. If you experience backup failures, consider using the [Time Machine Docker container](https://unraid.net/community/apps?q=time+machine#r) as an alternative. +::: ::: ## Creating a Time Machine share @@ -35,7 +35,6 @@ Ensure **%%SMB|samba%%** is enabled in the %%WebGUI|web-gui%%:
![Enhanced macOS interoperability](/img/enhancedmacos.png)
- ::: To create a Time Machine share: @@ -78,7 +77,6 @@ For more control over backup scheduling and options, consider using a third-part
![Time Machine Editor](/img/TimeMachineEditor.png)
- ::: ## Multiple Time Machine setups diff --git a/docs/unraid-os/using-unraid-to/manage-storage/array-configuration.mdx b/docs/unraid-os/using-unraid-to/manage-storage/array-configuration.mdx index 3f3577eacd..863720707e 100644 --- a/docs/unraid-os/using-unraid-to/manage-storage/array-configuration.mdx +++ b/docs/unraid-os/using-unraid-to/manage-storage/array-configuration.mdx @@ -422,20 +422,16 @@ Starting the array in Normal Mode at this point is optional. You can use it to v | **2 Disk Failures** | Data Lost | Data Lost | Rebuildable | :::tip[Tips for Safe Rebuilds] - - **For Single Parity:** You can only replace one disk at a time. If another disk fails during the rebuild, you could lose data. - **For Dual Parity:** You can replace one or two disks at the same time, but be cautious if more than two disks fail. - ::: :::important - If you experience a situation where **more disks fail than your parity can protect:** 1. **Immediately halt all write operations** to prevent further data loss. 2. Seek help by posting your issue in the [Unraid forums](https://forums.unraid.net/) along with diagnostics. 3. **Do not attempt a rebuild** until you've received advice - focus on salvaging your data first. - ::: @@ -451,9 +447,7 @@ Starting the array in Normal Mode at this point is optional. You can use it to v - If you see %%CRC errors|crc-errors%%, it usually points to issues with the cabling. Keep an eye on these errors, as they accumulate over time and don't reset. :::tip - To stay informed about drive issues, [enable notifications](../../getting-started/set-up-unraid/customize-unraid-settings.mdx#notification-settings) in Unraid. This way, you are alerted right away if something goes wrong, reducing the risk to your data. - ::: @@ -477,9 +471,7 @@ Starting the array in Normal Mode at this point is optional. You can use it to v While it's not mandatory, many users choose to pre-clear new drives to test them and help prevent early failure. You can do this with the Preclear plugin, a %%SMART|smart%% extended test, or manufacturer tools. :::caution - If you try to rebuild using an unmountable %%emulated drive|emulated-disk%%, the new drive will also become unmountable. Always repair the file system before attempting a rebuild. - ::: @@ -595,6 +587,7 @@ If Unraid prompts you to format the new disk during the rebuild, **do not do it* ::: To carry out a parity swap: + :::note If the drive to be replaced is already disabled (failed), you may not need to perform steps 1–4. If you have already installed the new replacement drive (for example, after preclearing), you can skip steps 5–8. @@ -606,9 +599,10 @@ If the drive to be replaced is already disabled (failed), you may not need to pe 3. **Start the array.** If prompted, check the box confirming your action. The data drive should now show as "Not installed." 4. **Stop the array again.** At this point, the array treats the drive as failed. 5. **Power down the server.** - :::tip + :::tip If your system supports **hot-swap**, you do not need to power down to remove or install disks. Just make sure the array is stopped before making any hardware changes. + ::: ::: @@ -872,9 +866,7 @@ Unraid provides various write modes for managing array operations, each with its - If you suspect that any drive is failing or is unreliable, it's best to steer clear of turbo write since it relies on every drive being operational. :::info - Turbo write is best suited for bulk operations and scenarios requiring high throughput. However, it might not be the best choice for everyday tasks if you're focused on energy savings and minimizing drive wear. - ::: @@ -905,9 +897,7 @@ Unraid provides various write modes for managing array operations, each with its - With NVMe cache: 250–900 MB/s depending on network or drive constraints. :::tip - Consider using a cache pool (multiple devices) for added redundancy and data protection before the %%Mover|mover%% runs. - ::: diff --git a/docs/unraid-os/using-unraid-to/manage-storage/partials/remove-data-disk-parity-preserve.mdx b/docs/unraid-os/using-unraid-to/manage-storage/partials/remove-data-disk-parity-preserve.mdx index 06f9a09688..f03ca73908 100644 --- a/docs/unraid-os/using-unraid-to/manage-storage/partials/remove-data-disk-parity-preserve.mdx +++ b/docs/unraid-os/using-unraid-to/manage-storage/partials/remove-data-disk-parity-preserve.mdx @@ -67,15 +67,11 @@ To remove a disk using the parity-preserve method: ``` :::note - Remember to replace `X` with the specific number of the data disk you are removing. - ::: :::caution - Before executing these commands, double-check the drive number to avoid accidentally erasing data on the wrong disk. - ::: Don't hesitate to reach out to the [Unraid forums](https://forums.unraid.net/). There, you can find helpful resources and community support. diff --git a/docs/unraid-os/using-unraid-to/manage-storage/shares.mdx b/docs/unraid-os/using-unraid-to/manage-storage/shares.mdx index 20a5dd7d3e..30924755e8 100644 --- a/docs/unraid-os/using-unraid-to/manage-storage/shares.mdx +++ b/docs/unraid-os/using-unraid-to/manage-storage/shares.mdx @@ -165,10 +165,8 @@ For shares containing data: 3. **Delete the share:** Follow the steps to delete an empty share above. :::caution - - The `rm -rf` command will permanently delete files. Double-check before using it. - Make sure no Docker or VM services are using the share before you delete it. - ::: @@ -339,9 +337,7 @@ There are three straightforward options you can select for how the system alloca - Arrays with mixed drive sizes :::note - High-water is the default method and works well for most users. It reduces drive thrashing compared to "Most-free." - ::: @@ -363,9 +359,7 @@ There are three straightforward options you can select for how the system alloca - Arrays where performance outweighs power savings :::tip - Combine with **%%split level|split-level%%** settings to group related files despite frequent disk switching. - ::: @@ -387,9 +381,7 @@ There are three straightforward options you can select for how the system alloca - Arrays with identical drive sizes :::caution - Without **Minimum Free Space** configured, "disk full" errors will occur when a drive nears capacity. - ::: diff --git a/docs/unraid-os/using-unraid-to/run-docker-containers/overview.mdx b/docs/unraid-os/using-unraid-to/run-docker-containers/overview.mdx index 4d3373c4a7..3221f67838 100644 --- a/docs/unraid-os/using-unraid-to/run-docker-containers/overview.mdx +++ b/docs/unraid-os/using-unraid-to/run-docker-containers/overview.mdx @@ -31,9 +31,7 @@ Unraid’s Docker integration is designed to be user-friendly for everyone. Each - **Limitations:** Unraid does not natively support Docker Compose. For more complex setups, check out the [official Docker Compose documentation](https://docs.docker.com/compose/). :::tip - Most users won’t need to interact with the `docker.img` file directly. However, knowing its role can be helpful for troubleshooting or understanding log messages. - ::: diff --git a/package-lock.json b/package-lock.json index 5122949413..633c204d8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "glob": "^11.0.0", "prettier": "^3.2.5", "remark-cli": "^12.0.1", + "remark-directive": "^3.0.0", "remark-frontmatter": "^5.0.0", "remark-gfm": "^4.0.1", "remark-lint-code-block-style": "^4.0.1", diff --git a/package.json b/package.json index 021a5673af..ce4986f94f 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "remark-lint-code-block-style": "^4.0.1", "remark-lint-definition-case": "^4.0.1", "remark-lint-fenced-code-marker": "^4.0.1", + "remark-directive": "^3.0.0", "remark-lint-heading-style": "^4.0.1", "remark-lint-link-title-style": "^4.0.1", "remark-lint-list-item-indent": "^4.0.1", @@ -98,5 +99,6 @@ }, "overrides": { "sharp": "^0.34.3" - } + }, + "packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67" } diff --git a/scripts/format-crowdin-spacing.js b/scripts/format-crowdin-spacing.js index 24444e0b6b..c6f38ed05d 100755 --- a/scripts/format-crowdin-spacing.js +++ b/scripts/format-crowdin-spacing.js @@ -275,6 +275,7 @@ function processContent(content, filePath) { const newLines = []; let jsxStack = []; // Track nested JSX elements + const admonitionIndentStack = []; let inCodeBlock = false; let codeBlockDelimiter = ''; @@ -330,21 +331,19 @@ function processContent(content, filePath) { } } + // Track admonition openings + if (/^\s*:::(tip|note|warning|caution|info|important)\b/.test(line)) { + const indentLength = (line.match(/^(\s*)/)[1] || '').length; + admonitionIndentStack.push(indentLength); + } + // Handle closing ::: directives if (trimmedLine === ':::') { - if (jsxStack.length > 0) { - // Inside JSX: preserve indentation matching the opening directive - let openingIndent = 0; - - // Look back to find the opening directive to match its indentation - for (let j = i - 1; j >= 0; j--) { - if (/^\s*:::(tip|note|warning|caution|info|important)\b/.test(lines[j])) { - openingIndent = lines[j].match(/^(\s*)/)[1].length; - break; - } - } + const expectedIndent = + admonitionIndentStack.length > 0 ? admonitionIndentStack.pop() : 0; + const correctIndent = ' '.repeat(expectedIndent); - const correctIndent = ' '.repeat(openingIndent); + if (jsxStack.length > 0) { if (line !== correctIndent + ':::') { newLines.push(correctIndent + ':::'); modified = true; @@ -352,9 +351,8 @@ function processContent(content, filePath) { newLines.push(line); } } else { - // Outside JSX: should not be indented - if (line !== ':::') { - newLines.push(':::'); + if (line !== correctIndent + ':::') { + newLines.push(correctIndent + ':::'); modified = true; } else { newLines.push(line); @@ -447,6 +445,10 @@ function processContent(content, filePath) { if (nextLine.trim() === '' || nextLine.trim().startsWith(':::')) { return match; } + const indentLength = (directive.match(/^(\s*)/)[1] || '').length; + if (indentLength > 0) { + return match; + } modified = true; return `${directive}\n\n${nextLine}`; }); @@ -459,6 +461,10 @@ function processContent(content, filePath) { if (trimmedContent.endsWith('>') || trimmedContent.startsWith(':::')) { return match; } + const indentLength = (closingDirective.match(/^(\s*)/)[1] || '').length; + if (indentLength > 0) { + return match; + } modified = true; return `${contentLine}\n\n${closingDirective}`; }); @@ -470,6 +476,10 @@ function processContent(content, filePath) { if (trimmedNext === '' || trimmedNext.startsWith(':::') || trimmedNext.startsWith('<')) { return match; } + const indentLength = (closingDirective.match(/^(\s*)/)[1] || '').length; + if (indentLength > 0) { + return match; + } modified = true; return `${closingDirective}\n\n${nextLine}`; }); From 288d2cea75fb8b25f41307acd6b2befed3eed771 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 30 Sep 2025 15:17:35 -0400 Subject: [PATCH 2/3] docs: clean up markdown files by removing trailing whitespace - Removed unnecessary trailing whitespace from various markdown files to improve readability and maintain consistency. - Ensured that all documentation files adhere to formatting standards, enhancing overall document quality. --- .../changing-the-flash-device.mdx | 2 ++ .../common-issues/data-recovery.mdx | 2 ++ docs/unraid-os/troubleshooting/faq.mdx | 3 +-- .../manage-storage/apple-time-machine.mdx | 2 ++ .../using-unraid-to/manage-storage/shares.mdx | 1 + scripts/format-crowdin-spacing.js | 14 ++++++++++---- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/unraid-os/system-administration/maintain-and-update/changing-the-flash-device.mdx b/docs/unraid-os/system-administration/maintain-and-update/changing-the-flash-device.mdx index 6dd4392452..b1ff300d6b 100644 --- a/docs/unraid-os/system-administration/maintain-and-update/changing-the-flash-device.mdx +++ b/docs/unraid-os/system-administration/maintain-and-update/changing-the-flash-device.mdx @@ -60,6 +60,8 @@ The [forum announcement on counterfeit SanDisk drives](https://forums.unraid.net ::: ::: +::: + --- ## Replacing your USB flash device diff --git a/docs/unraid-os/troubleshooting/common-issues/data-recovery.mdx b/docs/unraid-os/troubleshooting/common-issues/data-recovery.mdx index c798b96333..c33dc60930 100644 --- a/docs/unraid-os/troubleshooting/common-issues/data-recovery.mdx +++ b/docs/unraid-os/troubleshooting/common-issues/data-recovery.mdx @@ -175,6 +175,7 @@ If you used %%Maintenance Mode|maintenance-mode%%, stop the array and restart it If a previously functional disk becomes unmountable, this usually indicates file system corruption, often caused by an unclean shutdown or write failure. :::danger[Critical action] + Never format an unmountable disk through the %%WebGUI|web-gui%%! Formatting erases all data and updates %%parity|parity%%, making recovery impossible. ::: @@ -210,6 +211,7 @@ Here’s how to proceed: ``` :::danger + The `--repair` option is extremely dangerous and can cause further data loss. Always backup or image the disk first. Review [the documentation](https://btrfs.readthedocs.io/en/latest/btrfs-check.html) and consider seeking additional advice if you’re unsure. ::: diff --git a/docs/unraid-os/troubleshooting/faq.mdx b/docs/unraid-os/troubleshooting/faq.mdx index 34677957c4..c0189c4d9a 100644 --- a/docs/unraid-os/troubleshooting/faq.mdx +++ b/docs/unraid-os/troubleshooting/faq.mdx @@ -174,8 +174,7 @@ If you need help with Unraid OS, you have several support options: ``` Replace `X` with the correct drive letter (e.g., sda, sdb, sdc) - -::: + ::: 8. Continue with the normal Unraid setup and configuration. diff --git a/docs/unraid-os/using-unraid-to/manage-storage/apple-time-machine.mdx b/docs/unraid-os/using-unraid-to/manage-storage/apple-time-machine.mdx index cf5a7b5505..661ca5dda1 100644 --- a/docs/unraid-os/using-unraid-to/manage-storage/apple-time-machine.mdx +++ b/docs/unraid-os/using-unraid-to/manage-storage/apple-time-machine.mdx @@ -22,6 +22,8 @@ Some users report intermittent issues with Time Machine and network shares on ma ::: ::: +::: + ## Creating a Time Machine share :::caution[Before you begin] diff --git a/docs/unraid-os/using-unraid-to/manage-storage/shares.mdx b/docs/unraid-os/using-unraid-to/manage-storage/shares.mdx index 30924755e8..e9d1e21533 100644 --- a/docs/unraid-os/using-unraid-to/manage-storage/shares.mdx +++ b/docs/unraid-os/using-unraid-to/manage-storage/shares.mdx @@ -544,6 +544,7 @@ For security, it's best to keep your shares in *Private* mode and only grant acc ### Disk share guidelines :::danger[Important Reminder] + **Never copy files directly between a user share and a disk share** if their folder names are the same. This could lead to files being corrupted or deleted, resulting in permanent data loss. ::: diff --git a/scripts/format-crowdin-spacing.js b/scripts/format-crowdin-spacing.js index c6f38ed05d..2999174e8c 100755 --- a/scripts/format-crowdin-spacing.js +++ b/scripts/format-crowdin-spacing.js @@ -24,6 +24,8 @@ const colors = { }; const canonicalAdmonitionTypes = new Set(['note', 'tip', 'info', 'warning', 'caution', 'danger', 'important']); +// Build a dynamic regex group from canonical types so we don't miss any +const admonitionTypesGroup = Array.from(canonicalAdmonitionTypes).join('|'); const admonitionSynonyms = new Map([ ['nota', 'note'], @@ -279,6 +281,9 @@ function processContent(content, filePath) { let inCodeBlock = false; let codeBlockDelimiter = ''; + // Precompile regexes that depend on canonical admonition types + const admonitionOpeningLineRegex = new RegExp('^\\s*:::(?:' + admonitionTypesGroup + ')\\b'); + for (let i = 0; i < lines.length; i++) { let line = lines[i]; const trimmedLine = line.trim(); @@ -332,7 +337,7 @@ function processContent(content, filePath) { } // Track admonition openings - if (/^\s*:::(tip|note|warning|caution|info|important)\b/.test(line)) { + if (admonitionOpeningLineRegex.test(line)) { const indentLength = (line.match(/^(\s*)/)[1] || '').length; admonitionIndentStack.push(indentLength); } @@ -432,15 +437,16 @@ function processContent(content, filePath) { // Pattern: Closing directive followed directly by opening directive // E.g., :::important\n...\n:::\n:::note should have blank line between them - content = content.replace(/(^[ \t]*:::)$\n(^[ \t]*:::(tip|note|warning|caution|info|important)\b)/gm, (_, closingDirective, openingDirective) => { + const closingThenOpeningRegex = new RegExp('(^[ \t]*:::)$\\n(^[ \t]*:::(?:' + admonitionTypesGroup + ')\\b)', 'gm'); + content = content.replace(closingThenOpeningRegex, (_, closingDirective, openingDirective) => { modified = true; return `${closingDirective}\n\n${openingDirective}`; }); // Pattern: Opening admonition directive (with or without brackets/titles) followed directly by content // Matches: :::tip, :::tip\[Title], or :::tip Title formats - const admonitionOpenPattern = /^([ \t]*:::(tip|note|warning|caution|info|important)(?:\\?\[.*?\]|[^\n]*))$\n([^\n]+)$/gm; - content = content.replace(admonitionOpenPattern, (match, directive, type, nextLine) => { + const admonitionOpenPattern = new RegExp('^([ \\t]*:::(?:' + admonitionTypesGroup + ')(?:\\\\?\\[.*?\\]|[^\\n]*))$\\n([^\\n]+)$', 'gm'); + content = content.replace(admonitionOpenPattern, (match, directive, nextLine) => { // Skip if next line is blank or another directive if (nextLine.trim() === '' || nextLine.trim().startsWith(':::')) { return match; From 833aa157e370f9a13302c6b34481ed64b5aacd50 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 30 Sep 2025 15:20:06 -0400 Subject: [PATCH 3/3] chore: remove packageManager field from package.json for cleaner configuration --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index ce4986f94f..8e8da73833 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,5 @@ }, "overrides": { "sharp": "^0.34.3" - }, - "packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67" + } }