jenkins-bot has submitted this change and it was merged.
Change subject: Only emit trailing newline if stdout is a TTY
......................................................................
Only emit trailing newline if stdout is a TTY
This fixes round-tripping and testing with pipelines like this:
echo -n 'foo' | node parse | node parse --html2wt
At the same time, it still prints the trailing newline when used from a shell.
Change-Id: I6f7f9703769b3326a2cb20e6afbcaf8363e0b912
---
M js/tests/parse.js
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Subramanya Sastry: Looks good to me, approved
jenkins-bot: Verified
diff --git a/js/tests/parse.js b/js/tests/parse.js
index a4cd02b..9d6c070 100755
--- a/js/tests/parse.js
+++ b/js/tests/parse.js
@@ -276,7 +276,7 @@
parserPipeline.on('document', function ( document ) {
var res, finishCb = function (trailingNL) {
stdout.write( res );
- if (trailingNL) {
+ if (trailingNL && process.stdout.isTTY) {
stdout.write("\n");
}
};
--
To view, visit https://gerrit.wikimedia.org/r/59943
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6f7f9703769b3326a2cb20e6afbcaf8363e0b912
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits