agelessdummy / vimwiki

Automatically exported from code.google.com/p/vimwiki
0 stars 1 forks source link

Can I modified the internal wiki2html converter? #409

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I want to use 
bootstrap-scrollspy(http://twitter.github.com/bootstrap/javascript.html) in the 
html that vimwiki convert.  The Vimwiki2HTML convert the %toc to the directory 
looks like:
<div class="toc">
<ul>
<li><a href="#toc_1">1.title 1</a>
<li><a href="#toc_2">2.title 2</a>
<ul>
<li><a href="#toc_2.1">2.1 title 2.1</a>
</ul>
</ul>
</div>

but to use bootstrap-scrollspy, I need to add "class=nav" in <ul>, and more, I 
can't use  href="#toc_2.1" ,where the "." isn't supported by 
bootstrap-scrollspy. 

What I need is %toc can be converted to something like this:
<div class="toc">
<ul class="nav">
<li><a href="#toc_1">1.title 1</a>
<li><a href="#toc_2">2.title 2</a>
<ul>
<li><a href="#toc_2_1">2.1 title 2.1</a>
</ul>
</ul>
</div>

What should I do?

Original issue reported on code.google.com by xuezai...@gmail.com on 21 Mar 2013 at 11:24

GoogleCodeExporter commented 8 years ago
Modify the following line in file `autoload/vimwiki/html.vim` at line 1011

     let h_number .= a:id[l].'.'

to

     let h_number .= a:id[l].'_'

Original comment by themacropodus@gmail.com on 25 Mar 2013 at 11:34