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/26 12:14:55 UTC

(cordova-docs) branch master updated: fix: strip apostrophes and backticks in slug generation (#1478)

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

manuelbeck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new 6637bcf3a2 fix: strip apostrophes and backticks in slug generation (#1478)
6637bcf3a2 is described below

commit 6637bcf3a2a8ec3d011b826bd927abdfc7938302
Author: Manuel Beck <ma...@outlook.de>
AuthorDate: Thu Feb 26 13:14:49 2026 +0100

    fix: strip apostrophes and backticks in slug generation (#1478)
    
    - 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