You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2026/02/25 08:56:34 UTC

(cordova-docs) 01/01: fix: strip apostrophes and backticks in slug generation

This is an automated email from the ASF dual-hosted git repository.

manuelbeck pushed a commit to branch pr-fix-strip-apostrophes-and-backticks-in-slug-generation
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git

commit 109758452853f8bf8f4ff758cbecc7037a39a85d
Author: Manuel Beck <ma...@outlook.de>
AuthorDate: Wed Feb 25 09:55:59 2026 +0100

    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 6fbc25edaf..827a9758b0 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();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org