Skip to content

Commit a36a555

Browse files
committed
Quick change
1 parent 9f4389c commit a36a555

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

javascript/extractor/src/com/semmle/js/extractor/FileExtractor.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private static int skipBOM(byte[] bytes, int length) {
103103

104104
/** Information about supported file types. */
105105
public static enum FileType {
106-
HTML(".htm", ".html", ".xhtm", ".xhtml", ".vue", ".hbs", ".ejs", ".njk", ".erb", ".html.dot") {
106+
HTML(".htm", ".html", ".xhtm", ".xhtml", ".vue", ".hbs", ".ejs", ".njk", ".erb", ".dot") {
107107
@Override
108108
public IExtractor mkExtractor(ExtractorConfig config, ExtractorState state) {
109109
return new HTMLExtractor(config, state);
@@ -125,6 +125,12 @@ protected boolean contains(File f, String lcExt, ExtractorConfig config) {
125125
return false;
126126
}
127127
}
128+
// for DOT files we are only interrested in `.html.dot` files
129+
if (FileUtil.extension(f).equalsIgnoreCase(".dot")) {
130+
if (!f.getName().toLowerCase().endsWith(".html.dot")) {
131+
return false;
132+
}
133+
}
128134
return super.contains(f, lcExt, config);
129135
}
130136
},

0 commit comments

Comments
 (0)