JS: truncate js/unknown-directive message content

This commit is contained in:
Esben Sparre Andreasen
2018-10-26 15:21:16 +02:00
parent 244d8d5778
commit 8f635e6493
3 changed files with 8 additions and 1 deletions

View File

@@ -14,4 +14,4 @@ from Directive d
where not d instanceof KnownDirective and
// but exclude attribute top-levels: `<a href="javascript:'some-attribute-string'">`
not (d.getParent() instanceof CodeInAttribute)
select d, "Unknown directive: '" + d.getDirectiveText() + "'."
select d, "Unknown directive: '" + truncate(d.getDirectiveText(), 20, " ... (truncated)") + "'."