This fixes Markdown syntax for bold, italic, and bold_italic. With these
changes **bold** and __bold__, *italic* and _italic_, and
***bold_italic*** and ___italic_bold___ are shown correctly.
This closes#23, closes#189, closes#318, and closes#576.
Instead of forcing the TOC to always be at header level 1, allow the
user to specify via the option g:vimwiki_toc_header_level what level
they want.
This defaults to 1, so if the user does nothing then the old behavior
will remain the same.
Made each heading link to itself, by placing an <a> tag inside each
<h[1-6]> tag.
Also adds class="header" to each header, allowing for the CSS rule
.header a { ... }
to remove all styling from the inner links, allowing the outputed
document to look like before.
Currently, there is no easy way for a new user of this plugin to discover how to change the syntax. Markdown is favored by many in the community because it is more widely used than Vimwiki's default syntax and is therefore a more portable option. This configuration should be presented much more openly.
This reverts commit 599a0e9083.
Sorry, we can't simply change the syntax of something as basic as a
link, even if the old syntax is wrong. We need to keep Vimwiki
reasonably backwards compatible.
Two reasons whey the links in markdown wikis are not updated:
1. The markdown link pattern is wrong, should be []() rather than [][];
2. The logic of getting wiki local var cannot get correct wiki index as:
a. the renamed file's buffer is removed and %:p would return empty
b. the function that gets the wiki local var depends on buffer's %:p
value to find the wiki it belongs to and it would always return -1
and result in the default option values instead the user's option
The fix is
1. fix the markdown link pattern regex;
2. keep the renamed file's buffer open during the period of updating the link