shivaprasadks / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

MS-SQL - Escape character incorrect #341

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. When in SQL creating a string that ends with a "\", the highlighter thinks 
it is escaped, while this is not T-SQL syntax.
2. To reproduce, use this code as source code:
<pre class="prettyprint lang-sql">
 SELECT @BUPath = 'c:\backups\' + @DBName + '-B4 CHANGE.bak'
 SELECT @BUName = @DBName + '-B4 CHANGE'
</pre>
3.
(Please include HTML, not just your source code)
The output html will be:
<pre class="prettyprint lang-sql"><span class="pln"> </span><span 
class="kwd">SELECT</span><span class="pln"> </span><span 
class="pun">@</span><span class="pln">BUPath </span><span 
class="pun">=</span><span class="pln"> </span><span class="str">'c:\backups\' + 
@DBName + '</span><span class="pun">-</span><span class="pln">B4 
CHANGE</span><span class="pun">.</span><span class="pln">bak</span><span 
class="str">'
 SELECT @BUName = @DBName + '</span><span class="pun">-</span><span class="pln">B4 CHANGE</span><span class="str">'</span></pre>

What is the expected output?  What do you see instead?
I would have expected it to end the string marking at the \' of 'c:\backups\'

What version are you using?  On what browser?
Chrome Version 33.0.1750.154 m

Please provide any additional information below.

Original issue reported on code.google.com by alexan...@asamco.com on 21 Apr 2014 at 1:03