diff --git a/DesignNotes.wiki b/DesignNotes.wiki
new file mode 100644
index 0000000..2b8705c
--- /dev/null
+++ b/DesignNotes.wiki
@@ -0,0 +1,5 @@
+= Design Notes =
+
+This file is meant to document design decisions and algorithms inside vimwiki
+which are too large for code comments, and not necessarily interesting to
+users. Please create a new section to document each behavior.
diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim
index 7986609..bbb1963 100644
--- a/autoload/vimwiki/base.vim
+++ b/autoload/vimwiki/base.vim
@@ -1618,7 +1618,10 @@ function! vimwiki#base#TO_table_col(inner, visual)
endfunction
-function! vimwiki#base#AddHeaderLevel()
+function! vimwiki#base#AddHeaderLevel(...)
+ if a:1 > 1
+ call vimwiki#base#AddHeaderLevel(a:1 - 1)
+ endif
let lnum = line('.')
let line = getline(lnum)
let rxHdr = vimwiki#vars#get_syntaxlocal('rxH')
@@ -1646,7 +1649,10 @@ function! vimwiki#base#AddHeaderLevel()
endfunction
-function! vimwiki#base#RemoveHeaderLevel()
+function! vimwiki#base#RemoveHeaderLevel(...)
+ if a:1 > 1
+ call vimwiki#base#RemoveHeaderLevel(a:1 - 1)
+ endif
let lnum = line('.')
let line = getline(lnum)
let rxHdr = vimwiki#vars#get_syntaxlocal('rxH')
diff --git a/autoload/vimwiki/html.vim b/autoload/vimwiki/html.vim
index ba2cc4c..dcb491d 100644
--- a/autoload/vimwiki/html.vim
+++ b/autoload/vimwiki/html.vim
@@ -344,7 +344,27 @@ endfunction
function! s:tag_code(value)
- return ''.s:safe_html_preformatted(s:mid(a:value, 1)).'
'
+ let l:retstr = ' 0.5)
+ \ ? "black" : "white"
+
+ let l:retstr .=
+ \ " style='background-color:" . l:str .
+ \ ";color:" . l:fg_color . ";'"
+ endif
+
+ let l:retstr .= '>'.s:safe_html_preformatted(l:str).'
'
+ return l:retstr
endfunction
@@ -1529,6 +1549,7 @@ function! s:convert_file(path_html, wikifile)
let title = s:process_title(placeholders, fnamemodify(a:wikifile, ":t:r"))
let date = s:process_date(placeholders, strftime('%Y-%m-%d'))
+ let wiki_path = strpart(s:current_wiki_file, strlen(vimwiki#vars#get_wikilocal('path')))
let html_lines = s:get_html_template(template_name)
@@ -1537,6 +1558,7 @@ function! s:convert_file(path_html, wikifile)
call map(html_lines, 'substitute(v:val, "%date%", "'. date .'", "g")')
call map(html_lines, 'substitute(v:val, "%root_path%", "'.
\ s:root_path(vimwiki#vars#get_bufferlocal('subdir')) .'", "g")')
+ call map(html_lines, 'substitute(v:val, "%wiki_path%", "'. wiki_path .'", "g")')
let css_name = expand(vimwiki#vars#get_wikilocal('css_name'))
let css_name = substitute(css_name, '\', '/', 'g')
diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt
index b1b2c77..e8de748 100644
--- a/doc/vimwiki.txt
+++ b/doc/vimwiki.txt
@@ -892,6 +892,12 @@ For Markdown syntax these variations are used: >
Furthermore, there are a number of words which are highlighted extra flashy:
TODO, DONE, STARTED, FIXME, FIXED, XXX.
+When rendered as HTML, code blocks containing only a hash prefixed 6 digit hex
+number will be colored as themselves. For example >
+ `#ffe119`
+Becomes >
+ #ffe119
+
------------------------------------------------------------------------------
5.2. Links *vimwiki-syntax-links*
@@ -2064,13 +2070,17 @@ Each template could look like: >