diff options
author | teramako | 2009-02-04 14:33:04 +0000 |
---|---|---|
committer | teramako | 2009-02-04 14:33:04 +0000 |
commit | c0c9d2fa1d010b1fc56537a399009dfa37fb8e13 (patch) | |
tree | b9f32973219ea5d31edbb57755637c8afc064ef2 | |
parent | 895b91aec3a8ed195cd04d007627e4702abb39a1 (diff) | |
download | vimperator-plugins-c0c9d2fa1d010b1fc56537a399009dfa37fb8e13.tar.bz2 |
fix: wikiparser したかな...?
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29546 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | pluginManager.js | 17 |
1 files changed, 14 insertions, 3 deletions
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(<dd/>); + this.xmlstack.appendChild(<dl><dd/></dl>); } 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].* += <br/> + xml.*; + else + buf[buf.length()-1].* += xml.*; + } else + this.stack[this.length-1] += xml; + return this.last; }, appendLastChild: function(xml){ |