Bug 326346 - [validation] JSDT doesn’t understand multi-line strings
Summary: [validation] JSDT doesn’t understand multi-line strings
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: 3.2.2 P   Edit
Assignee: Chris Jaun CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: needinfo
Depends on: 241647
Blocks:
  Show dependency tree
 
Reported: 2010-09-27 15:30 EDT by Chris Jaun CLA
Modified: 2010-09-29 17:54 EDT (History)
4 users (show)

See Also:
thatnitind: review+


Attachments
patch w/Junits (11.94 KB, patch)
2010-09-27 15:31 EDT, Chris Jaun CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Jaun CLA 2010-09-27 15:30:40 EDT
+++ This bug was initially created as a clone of Bug #241647 +++

Build ID: I20080617-2000

JSDT doesn’t understand multi-line strings. In the following example, you will get an error ‘String literal is not properly closed by a double-quote’, even though it should just work.

Also, the error description seems incorrect as in JS strings can use both single and double-quotes.

Example:

var xslt = new DOMParser().parseFromString('\
    <xsl:stylesheet version="1.0"\
        xmlns="http://www.w3.org/1999/xhtml"\
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\
        <xsl:output method="html" indent="no"/>\
        <xsl:template match="/">\
            <div>\
                <xsl:apply-templates select="*" />\
            </div>\
        </xsl:template>\
    </xsl:stylesheet>\
');

~Grauw
Comment 1 Chris Jaun CLA 2010-09-27 15:31:27 EDT
Created attachment 179682 [details]
patch w/Junits
Comment 2 Chris Jaun CLA 2010-09-29 17:54:31 EDT
Checked into patches build by Nitin.