diff --git a/a.js b/a.js new file mode 100644 index 0000000..a1fe479 --- /dev/null +++ b/a.js @@ -0,0 +1,12 @@ +// Generated by CoffeeScript 1.6.2 +(function() { + var a; + + a = '\ + this is a test\ + but is this?\ + test\ + test'; + console.log(JSON.stringify(a)) + +}).call(this); diff --git a/lib/templates.js b/lib/templates.js index ebf1200..f4d3754 100644 --- a/lib/templates.js +++ b/lib/templates.js @@ -36,7 +36,7 @@ module.exports = { }, statics: { "_rels/.rels": xml("\n \n \n \n \n"), - "xl/styles.xml": xml("\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"), + "xl/styles.xml": xml("\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"), "xl/sharedStrings.xml": xml("\n"), "docProps/app.xml": xml("\n\n node-xlsx-stream\n 0\n false\n Microsoft Corporation\n false\n false\n false\n " + (require('../package.json').version) + "\n") }, diff --git a/lib/utils.js b/lib/utils.js index b40b03c..936aa50 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -27,7 +27,7 @@ module.exports = { if (_.isNumber(val) && _.isFinite(val)) { return "" + val + ""; } else if (_.isDate(val)) { - return "" + (val.toISOString()) + ""; + return "" + (val.toISOString()) + ""; } else if (_.isBoolean(val)) { return "" + (val ? '1' : '0') + ""; } else { diff --git a/src/templates.coffee b/src/templates.coffee index eb51d94..358a9d2 100644 --- a/src/templates.coffee +++ b/src/templates.coffee @@ -8,10 +8,7 @@ module.exports = worksheet: header: xml """ - + @@ -29,20 +26,13 @@ module.exports = header: xml """ - - - - - - - + + + + + + + """ sheet: (sheet)-> """ @@ -60,20 +50,15 @@ module.exports = """ footer: xml """ - - + + """ "xl/workbook.xml": header: xml """ - + @@ -103,11 +88,7 @@ module.exports = "xl/styles.xml": xml """ - + @@ -137,8 +118,10 @@ module.exports = - - + + + + @@ -146,8 +129,7 @@ module.exports = - + diff --git a/src/utils.coffee b/src/utils.coffee index b384e1c..3017e95 100644 --- a/src/utils.coffee +++ b/src/utils.coffee @@ -24,7 +24,7 @@ module.exports = if _.isNumber(val) and _.isFinite(val) "#{val}" else if _.isDate(val) - "#{val.toISOString()}" + "#{val.toISOString()}" else if _.isBoolean(val) "#{if val then '1' else '0'}" else