r9509 - apps/gobi/trunk/code/Global

[email protected]
Newsgroups gmane.comp.java.helma.cvs
Message-ID <[email protected]>
Author: hannes
Date: 2009-02-17 13:36:05 +0100 (Tue, 17 Feb 2009)
New Revision: 9509

Modified:
   apps/gobi/trunk/code/Global/WikiMarkup.js
Log:
Suppress auto-TOC when text only has one header.

Details at http://dev.helma.org/trac/helma/changeset/9509

Modified: apps/gobi/trunk/code/Global/WikiMarkup.js
===================================================================
--- apps/gobi/trunk/code/Global/WikiMarkup.js	2009-02-17 11:20:51 UTC (rev 9508)
+++ apps/gobi/trunk/code/Global/WikiMarkup.js	2009-02-17 12:36:05 UTC (rev 9509)
@@ -231,7 +231,7 @@
             if (written < chars.length) {
                 buffer.append(chars, written, chars.length - written);
             }
-            if (tocPosFound) {
+            if (tocPosFound && headers.length > 1) {
                 buffer.insert(tocPos, page.renderSkinAsString('toc'))
             }
             return buffer.toString();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.