JS: Cap length of extracted string

This commit is contained in:
Asger F
2019-11-17 23:06:47 +00:00
parent f813e06680
commit 6f15eff954
2 changed files with 2 additions and 2 deletions

View File

@@ -520,7 +520,7 @@ public class ASTExtractor {
OffsetTranslation offsets = new OffsetTranslation();
offsets.set(0, 1); // skip the initial '/'
regexpExtractor.extract(source.substring(1, source.lastIndexOf('/')), offsets, nd, false);
} else if (nd.isStringLiteral() && !c.isInsideType()) {
} else if (nd.isStringLiteral() && !c.isInsideType() && nd.getRaw().length() < 100) {
regexpExtractor.extract(valueString, makeStringLiteralOffsets(nd.getRaw()), nd, true);
}
return key;

View File

@@ -37,7 +37,7 @@ public class Main {
* A version identifier that should be updated every time the extractor changes in such a way that
* it may produce different tuples for the same file under the same {@link ExtractorConfig}.
*/
public static final String EXTRACTOR_VERSION = "2019-10-23";
public static final String EXTRACTOR_VERSION = "2019-11-17";
public static final Pattern NEWLINE = Pattern.compile("\n");