Skip to content

Commit

Permalink
now no links should be removed anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
apppro123 committed Jan 13, 2021
1 parent a93330b commit 732d1ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/minify-document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export function minifyDocument(doc: vscode.TextDocument): void {

function minifyPHP(phpText: string): string {
//replace all html comments
let minifiedText = phpText.replace(/<!-- [\s\S]*?-->/g, '');
let minifiedText = phpText.replace(/<!--[\s\S]*?-->/g, '');
//remove php comments
minifiedText = minifiedText.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, '');
minifiedText = minifiedText.replace(/\/\*[\s\S]*?\*\/|(?<!\:)\/\/.*/g, '');
//remove white space
minifiedText = minifiedText.replace(/\r/g, '');
minifiedText = minifiedText.replace(/\n/g, '');
Expand Down

0 comments on commit 732d1ab

Please sign in to comment.