Skip to content

Commit

Permalink
Revert "Improve regex to handle nested comments more efficiently (#1164
Browse files Browse the repository at this point in the history
…)"

This reverts commit c53d0c8.
  • Loading branch information
w666 authored Oct 8, 2024
1 parent c53d0c8 commit a1d24e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class HttpClient implements IHttpClient {
if (typeof body === 'string') {
// Remove any extra characters that appear before or after the SOAP envelope.
const regex = /(?:<\?[^?]*\?>[\s]*)?<([^:]*):Envelope([\S\s]*)<\/\1:Envelope>/i;
const match = body.replace(/<!--(?:(?!<!--[\s\S])*?)-->/, '').match(regex);
const match = body.replace(/<!--[\s\S]*?-->/, '').match(regex);
if (match) {
body = match[0];
}
Expand Down

0 comments on commit a1d24e5

Please sign in to comment.