You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ko...@apache.org on 2014/09/03 15:03:14 UTC
git commit: [OLINGO-416] fix in browserify tranform stipheader
Repository: olingo-odata4-js
Updated Branches:
refs/heads/master 661ae6727 -> 289d0843a
[OLINGO-416] fix in browserify tranform stipheader
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/commit/289d0843
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/289d0843
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/289d0843
Branch: refs/heads/master
Commit: 289d0843ac168a333cf063183913a70c9a90e100
Parents: 661ae67
Author: Sven Kobler <sv...@sap.com>
Authored: Wed Sep 3 15:02:37 2014 +0200
Committer: Sven Kobler <sv...@sap.com>
Committed: Wed Sep 3 15:03:04 2014 +0200
----------------------------------------------------------------------
.../browserify_transforms/stripheader/stripheader.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/289d0843/odatajs/grunt-config/browserify_transforms/stripheader/stripheader.js
----------------------------------------------------------------------
diff --git a/odatajs/grunt-config/browserify_transforms/stripheader/stripheader.js b/odatajs/grunt-config/browserify_transforms/stripheader/stripheader.js
index 7df58cb..68527ec 100644
--- a/odatajs/grunt-config/browserify_transforms/stripheader/stripheader.js
+++ b/odatajs/grunt-config/browserify_transforms/stripheader/stripheader.js
@@ -2,14 +2,17 @@ var through = require('through');
module.exports = function (file) {
//if (/\.json$/.test(file)) return through();
-
+ //console.log('strip header from ' + file);
var data = "";
+
return through(
function (buf) { data += buf; },
function () {
try {
- var out = data.replace(/^(\/\*(.|\n|\r)*?\*\/)/gi,"");
+ //console.log('\nin--------------\na'+data.substring(0,1000));
+ var out = data.replace(/(\/\*(.|\n|\r)*?\*\/)/i,"");
+ //console.log('\nout--------------\n'+out.substring(0,300));
this.queue(out);
} catch (er) {
this.emit("error", new Error(er.toString().replace("Error: ", "") + " (" + file + ")"));