JS: Extract script tags with lang=tsx

This commit is contained in:
Asger Feldthaus
2021-06-14 13:40:53 +02:00
parent b14fa8b4cd
commit bc375196d1
4 changed files with 27 additions and 7 deletions

View File

@@ -271,7 +271,7 @@ public class HTMLExtractor implements IExtractor {
private boolean isTypeScriptTag(Element script) {
String language = getScriptLanguage(script);
if ("ts".equals(language) || "typescript".equals(language)) return true;
if ("ts".equals(language) || "tsx".equals(language) || "typescript".equals(language)) return true;
String type = getAttributeValueLC(script, "type");
if (type != null && type.contains("typescript")) return true;
return false;