Skip to content

Commit

Permalink
feat: add support for xhtml (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
grumbaut authored and JustinBeckwith committed Oct 9, 2019
1 parent e96b526 commit 08084de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,8 @@ export async function check(options: CheckOptions) {
*/
function isHtml(response: gaxios.GaxiosResponse): boolean {
const contentType = response.headers['content-type'] || '';
return !!contentType.match('text/html');
return (
!!contentType.match(/text\/html/g) ||
!!contentType.match(/application\/xhtml\+xml/g)
);
}

0 comments on commit 08084de

Please sign in to comment.