From c0c9d2fa1d010b1fc56537a399009dfa37fb8e13 Mon Sep 17 00:00:00 2001 From: teramako Date: Wed, 4 Feb 2009 14:33:04 +0000 Subject: fix: wikiparser したかな...? git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29546 d0d07461-0603-4401-acd4-de1884942a52 --- pluginManager.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'pluginManager.js') diff --git a/pluginManager.js b/pluginManager.js index 65e0a5e..ad7aacd 100644 --- a/pluginManager.js +++ b/pluginManager.js @@ -411,7 +411,7 @@ WikiParser.prototype = { // {{{ } else { this.xmlstack.reorg(-2); this.mode = this.pendingMode; - indentList.pop(); + //indentList.pop(); if (indentList.length == 0) indentList = [0]; } prevMode = this.mode; @@ -425,7 +425,7 @@ WikiParser.prototype = { // {{{ if (currentIndent > prevIndent){ if (this.mode){ if (prevMode == 'dl'){ - this.xmlstack.appendChild(
); + this.xmlstack.appendChild(
); } this.xmlstack.push(bufXML); indentList.push(currentIndent); @@ -489,8 +489,19 @@ HTMLStack.prototype = { // {{{ return this.last; }, appendChild: function(xml){ + if (this.length == 0){ + this.push(xml); + return xml; + } var buf = this.stack[this.length-1]; - buf[buf.length()-1].* += xml; + if (buf[buf.length()-1].localName() == xml.localName()){ + if (this.isInline(xml.*[0])) + buf[buf.length()-1].* +=
+ xml.*; + else + buf[buf.length()-1].* += xml.*; + } else + this.stack[this.length-1] += xml; + return this.last; }, appendLastChild: function(xml){ -- cgit v1.2.3