[gnome-code-assistance] [backends/js] Fix parsing actual file contents



commit 541840550b42e826f1eb7b9a6d61f8b57c368cfc
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Nov 9 12:31:29 2013 +0100

    [backends/js] Fix parsing actual file contents

 backends/js/main.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/backends/js/main.js b/backends/js/main.js
index 74a9aeb..53235b5 100644
--- a/backends/js/main.js
+++ b/backends/js/main.js
@@ -50,9 +50,10 @@ Service.prototype = {
             var p = this._data_path(path, unsaved);
             var c = GLib.file_get_contents(p);
 
+            doc.errors = [];
+
             try {
-                Acorn.parse(c);
-                doc.errors = [];
+                Acorn.parse(c[1]);
             } catch (e) {
                 let loc = new Types.SourceLocation({
                     line: e.loc.line,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]