Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__TOC__ element following a single <h1> but before multiple <h2> elements results in the table of contents ONLY displaying the <h1> element in the TOC.d #12

Closed
GoogleCodeExporter opened this issue Feb 13, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.Create a wiki page the looks like:
= My Title =
__TOC__
== sec 1 ==
stuff
== sec 2 ==
stuff
== sec3 ==
stuff
== sec4 ==
stuff
2. Not that the generated TOC only shows "My Title"
3. If you move the __TOC__ element below "== sec 1 ==", the table of
contents renders properly with all == sec# == elements in the TOC.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
bliki 3.0.11

Please provide any additional information below.

Original issue reported on code.google.com by steven.b...@gmail.com on 30 Apr 2009 at 4:17

@GoogleCodeExporter
Copy link
Author

Original comment by axelclk@gmail.com on 30 Apr 2009 at 4:26

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

I ran into this one tonight, and was able to track down the cause.  It is 
caused by cloning the toc tag, but continuing to use the the toc anchor list 
from the cloned object.  The one-liner fix is below.

Thanks for the awesome library!


### Eclipse Workspace Patch 1.0
#P info.bliki.wiki
Index: bliki-core/src/main/java/info/bliki/wiki/model/AbstractWikiModel.java
===================================================================
--- 
bliki-core/src/main/java/info/bliki/wiki/model/AbstractWikiModel.java   (revision 
3603)
+++ 
bliki-core/src/main/java/info/bliki/wiki/model/AbstractWikiModel.java   (working 
copy)
@@ -883,6 +883,7 @@
                tableOfContentTag.setShowToC(true);
                tableOfContentTag.setTOCIdentifier(isTOCIdentifier);
                fTableOfContentTag = tableOfContentTag;
+               fTableOfContent = null;
                // } catch (CloneNotSupportedException e) {
                // e.printStackTrace();
                // }

Original comment by HebnerN@gmail.com on 9 Jun 2011 at 7:54

@GoogleCodeExporter
Copy link
Author

Patch commited with r3604

Original comment by axelclk@gmail.com on 9 Jun 2011 at 5:39

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant