From 109758452853f8bf8f4ff758cbecc7037a39a85d Mon Sep 17 00:00:00 2001 From: Manuel Beck Date: Wed, 25 Feb 2026 09:55:59 +0100 Subject: [PATCH] fix: strip apostrophes and backticks in slug generation - If a section contains an apostroph or backtick, jumping to it will not work - Example: ```Creating SPM's `Package.swift` File``` must be made to `creating-spms-packageswift-file` --- www/static/js/docs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/static/js/docs.js b/www/static/js/docs.js index 6fbc25edaf7..827a9758b09 100644 --- a/www/static/js/docs.js +++ b/www/static/js/docs.js @@ -57,7 +57,7 @@ $(document).ready(function () { // a better regex would have been /[^\d\s\w-_]/ug, but the 'u' flag // (Unicode) is not supported in some browsers, and we support // many languages that use Unicode characters - text = text.replace(/[\[\]\(\)\;\:\=\+\?\!\.\,\{\}\\\/\>\<]/g, ''); + text = text.replace(/[\[\]\(\)\;\:\=\+\?\!\.\,\{\}\\\/\>\<'`]/g, ''); // trim remaining whitespace text = text.trim();