Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326346

Summary: [validation] JSDT doesn’t understand multi-line strings
Product: [WebTools] JSDT Reporter: Chris Jaun <cmjaun>
Component: GeneralAssignee: Chris Jaun <cmjaun>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P3 CC: dominic.chambers, laurens.nospam, mauromol, thatnitind
Version: 3.2.2Keywords: needinfo
Target Milestone: 3.2.2 PFlags: thatnitind: review+
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on: 241647    
Bug Blocks:    
Attachments:
Description Flags
patch w/Junits none

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.