mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
41 lines
747 B
XML
41 lines
747 B
XML
<!DOCTYPE qhelp PUBLIC
|
|
"-//Semmle//qhelp//EN"
|
|
"qhelp.dtd">
|
|
<qhelp>
|
|
<overview>
|
|
<p>
|
|
Multi-line string literals are not supported on all platforms, and thus should be avoided.
|
|
</p>
|
|
|
|
</overview>
|
|
<recommendation>
|
|
|
|
<p>
|
|
Replace multi-line string literals by multiple strings concatenated with the <code>+</code> operator.
|
|
</p>
|
|
|
|
</recommendation>
|
|
<example>
|
|
|
|
<p>
|
|
The following example contains a string literal spanning three lines:
|
|
</p>
|
|
|
|
<sample src="examples/MultilineStringLiteral.js" />
|
|
|
|
<p>
|
|
It should be rewritten like this:
|
|
</p>
|
|
|
|
<sample src="examples/MultilineStringLiteralGood.js" />
|
|
|
|
</example>
|
|
<references>
|
|
|
|
|
|
<li>Ecma International, <i>ECMAScript Language Definition</i>, 5.1 Edition, Section 7.8.4. ECMA, 2011.</li>
|
|
|
|
|
|
</references>
|
|
</qhelp>
|