From 29a87f7c5b2ddddf7c5c738c4747ffd6f6bb35bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Fri, 25 Apr 2014 15:08:16 +0200 Subject: [PATCH 1/1] smartxml: minor refactoring - better naming --- src/smartxml/core.js | 2 +- src/smartxml/smartxml.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smartxml/core.js b/src/smartxml/core.js index 9630a77..419b175 100644 --- a/src/smartxml/core.js +++ b/src/smartxml/core.js @@ -106,7 +106,7 @@ var elementNodeTransformations = { detach: function() { var next; - if(this.parent() && this.isSurroundedByTextElements()) { + if(this.parent() && this.isSurroundedByTextNodes()) { next = this.next(); this.prev().appendText(next.getText()); next.detach(); diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index 3ee49b7..502eda6 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -122,7 +122,7 @@ $.extend(DocumentNode.prototype, { return myIdx < parentContents.length - 1 ? parentContents[myIdx+1] : null; }, - isSurroundedByTextElements: function() { + isSurroundedByTextNodes: function() { var prev = this.prev(), next = this.next(); return prev && (prev.nodeType === Node.TEXT_NODE) && next && (next.nodeType === Node.TEXT_NODE); -- 2.20.1