File size: 307 Bytes
0ee2ef4
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { defaultHTML } from "./consts";

export const isTheSameHtml = (currentHtml: string): boolean => {
  const normalize = (html: string): string =>
    html
      .replace(/<!--[\s\S]*?-->/g, "")
      .replace(/\s+/g, " ")
      .trim();

  return normalize(defaultHTML) === normalize(currentHtml);
};