]*\shref="([^"]+)"[^>]*>([^<]+)<\/a>/ig, (match, href, html) => {
// Exit if the href attribute doesn't exists.
if (!href) return match;
diff --git a/source/js/third-party/search/algolia-search.js b/source/js/third-party/search/algolia-search.js
index 2910b39..12a554c 100644
--- a/source/js/third-party/search/algolia-search.js
+++ b/source/js/third-party/search/algolia-search.js
@@ -42,8 +42,8 @@ document.addEventListener('DOMContentLoaded', () => {
templates: {
text: data => {
const stats = CONFIG.i18n.hits_time
- .replace(/\$\{hits}/, data.nbHits)
- .replace(/\$\{time}/, data.processingTimeMS);
+ .replace('${hits}', data.nbHits)
+ .replace('${time}', data.processingTimeMS);
return `${stats}
`;
}
@@ -70,7 +70,7 @@ document.addEventListener('DOMContentLoaded', () => {
},
empty: data => {
return `
- ${CONFIG.i18n.empty.replace(/\$\{query}/, data.query)}
+ ${CONFIG.i18n.empty.replace('${query}', data.query)}
`;
}
},
diff --git a/source/js/third-party/search/local-search.js b/source/js/third-party/search/local-search.js
index a3e5847..92a264d 100644
--- a/source/js/third-party/search/local-search.js
+++ b/source/js/third-party/search/local-search.js
@@ -39,7 +39,7 @@ document.addEventListener('DOMContentLoaded', () => {
}
return right.id - left.id;
});
- const stats = CONFIG.i18n.hits.replace(/\$\{hits}/, resultItems.length);
+ const stats = CONFIG.i18n.hits.replace('${hits}', resultItems.length);
container.classList.remove('no-result');
container.innerHTML = `${stats}