Skip to content

Commit

Permalink
listjs - correctly patch list.min.js to support special character
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cderv committed Sep 6, 2024
1 parent 4f382f2 commit e353f59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package/src/common/update-html-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ export async function updateHtmlDependencies(config: Configuration) {
// Omit regular expression escaping
// (Fixes https://github.com/quarto-dev/quarto-cli/issues/8435)
const contents = Deno.readTextFileSync(listJs);
const removeContent = /e=\(e=t\.utils\.toString\(e\)\.toLowerCase\(\)\)\.replace\(.*?\),/g
const cleaned = contents.replaceAll(removeContent, "");
const removeContent = /(\(e=t\.utils\.toString\(e\)\.toLowerCase\(\)\))\.replace\(.*\)(,r=e)/g;
const cleaned = contents.replace(removeContent, "$1$2");
Deno.writeTextFileSync(listJs, cleaned);

return Promise.resolve();
Expand Down
Loading

0 comments on commit e353f59

Please sign in to comment.