Skip to content

Commit d57aae7

Browse files
committed
listjs - correctly patch list.min.js to support special character
This is a follow up on a2e298e which patches list.min.js to fix #8435. The fix suggested in javve/list.js#699 only remove the regex handling. Our initial patch was also removing the lowercase processing which broke search. This fixes #10720
1 parent 6173a70 commit d57aae7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package/src/common/update-html-dependencies.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ export async function updateHtmlDependencies(config: Configuration) {
187187
// Omit regular expression escaping
188188
// (Fixes https://github.com/quarto-dev/quarto-cli/issues/8435)
189189
const contents = Deno.readTextFileSync(listJs);
190-
const removeContent = /e=\(e=t\.utils\.toString\(e\)\.toLowerCase\(\)\)\.replace\(.*?\),/g
191-
const cleaned = contents.replaceAll(removeContent, "");
190+
const removeContent = /(\(e=t\.utils\.toString\(e\)\.toLowerCase\(\)\))\.replace\(.*\)(,r=e)/g;
191+
const cleaned = contents.replace(removeContent, "$1$2");
192192
Deno.writeTextFileSync(listJs, cleaned);
193193

194194
return Promise.resolve();

0 commit comments

Comments
 (0)