void () { String in = "<blockquote>one two <!-- and I cannot emphasize this enough --> three</blockquote>"; assertEquals("find comment", 1, findMatchesCount(in, "<!-- '_x -->", HtmlFileType.INSTANCE)); assertEquals("find comment 2", 1, findMatchesCount(in, "<!-- and I cannot emphasize this enough -->", HtmlFileType.INSTANCE)); assertEquals("find partial text", 1, findMatchesCount(in, "two", HtmlFileType.INSTANCE)); assertEquals("find text ignoring comments & whitespace", 1, findMatchesCount(in, " one two three ", HtmlFileType.INSTANCE)); assertEquals("find text with comments, ignoring whitespace", 1, findMatchesCount(in, " one two <!-- and I cannot emphasize this enough --> three ", HtmlFileType.INSTANCE)); assertEquals("find text & var with comments, ignoring whitespace", 1, findMatchesCount(in, " one two <!-- and I cannot emphasize this enough --> '_x+ ", HtmlFileType.INSTANCE)); assertEquals("should find nothing, comment doesn't match", 0, findMatchesCount(in, " one two <!-- I can emphasize this enough --> three ", HtmlFileType.INSTANCE)); }