From 9e3154655f6359637cd6e2264845b2cd78b2fd88 Mon Sep 17 00:00:00 2001
From: "Tate, Hongliang Tian" <tatetian@gmail.com>
Date: Sun, 1 Mar 2015 20:39:12 +0800
Subject: [PATCH] Remove annoying space between inline-block span

---
 PseudoCode.js | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/PseudoCode.js b/PseudoCode.js
index 35ae262..b158275 100644
--- a/PseudoCode.js
+++ b/PseudoCode.js
@@ -862,20 +862,28 @@ function HTMLBuilder() {
 }
 
 HTMLBuilder.prototype.beginDiv = function(className, style, extraStyle) {
-    return this._beginTag('div', className, style, extraStyle);
+    this._beginTag('div', className, style, extraStyle);
+    this._body.push('\n'); // make the generated HTML more human friendly
+    return this;
 };
 
 HTMLBuilder.prototype.endDiv = function() {
-    return this._endTag('div');
+    this._endTag('div');
+    this._body.push('\n'); // make the generated HTML more human friendly
+    return this;
 };
 
 HTMLBuilder.prototype.beginP = function(className, style, extraStyle) {
-    return this._beginTag('p', className, style, extraStyle);
+    this._beginTag('p', className, style, extraStyle);
+    this._body.push('\n'); // make the generated HTML more human friendly
+    return this;
 };
 
 HTMLBuilder.prototype.endP = function() {
     this._flushText();
-    return this._endTag('p');
+    this._endTag('p');
+    this._body.push('\n'); // make the generated HTML more human friendly
+    return this;
 };
 
 HTMLBuilder.prototype.beginSpan = function(className, style, extraStyle) {
@@ -906,7 +914,7 @@ HTMLBuilder.prototype.write = function(html) {
 
 HTMLBuilder.prototype.toMarkup = function() {
     this._flushText();
-    var html = this._body.join('\n');
+    var html = this._body.join('');
     return html;
 }
 
-- 
GitLab