From 8865db4e5f16e7600a8c2df08cc0aeadae07552a Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 26 Feb 2025 11:36:45 +0100 Subject: [PATCH] Fix portuguese urls --- docs/utils/mastheadHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/utils/mastheadHelper.js b/docs/utils/mastheadHelper.js index 7e60a3b7..4ae3b963 100644 --- a/docs/utils/mastheadHelper.js +++ b/docs/utils/mastheadHelper.js @@ -4,7 +4,7 @@ function matchPageWithSelection(language, currentUrl){ // checks if parameter is 'en', if so, removes it from the url newLanguage = language === 'en' ? '' : `${language}`; // regex to match the current url and extract the language and the rest of the url - let regex = /(?:(?:(\/(?:docs|contribute|stats)\/))(?:(es|fr)\/)?(.*))|(\/(?:es|fr|pt)\/|\/)$/ + let regex = /(?:(?:(\/(?:docs|contribute|stats)\/))(?:(es|fr|pt)\/)?(.*))|(\/(?:es|fr|pt)\/|\/)$/ let [fullURL, first, urlLang = 'en', rest, home] = regex.exec(currentUrl); if (home) {