Skip to content

fix: use url-parse for url construction #15670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Nov 27, 2024
Prev Previous commit
Next Next commit
prettier
  • Loading branch information
sreya committed Nov 27, 2024
commit efc016051329cb611f5ea16a8ab128cf791e51f3
18 changes: 9 additions & 9 deletions offlinedocs/pages/[[...slug]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,18 @@ const getNavigation = (manifest: Manifest): Nav => {
};

const removeHtmlComments = (input: string) => {
if (!input) return '';
if (!input) return "";

let lastResult = input;
let currentResult = '';
let currentResult = "";

// Keep replacing until no more changes occur
do {
currentResult = lastResult.replace(/<!--[\s\S]*?-->/g, '');
if (currentResult === lastResult) {
break;
}
lastResult = currentResult;
currentResult = lastResult.replace(/<!--[\s\S]*?-->/g, "");
if (currentResult === lastResult) {
break;
}
lastResult = currentResult;
} while (true);
return currentResult;
};
Expand Down
Loading