From bda3a59f912cb18a4d663237ab748af5b01eaa5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 14 Oct 2018 23:31:26 +0200 Subject: [PATCH] Made headings link to themselves. Made each heading link to itself, by placing an tag inside each 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. --- autoload/vimwiki/html.vim | 6 ++++-- autoload/vimwiki/style.css | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/vimwiki/html.vim b/autoload/vimwiki/html.vim index 4d44510..ba2cc4c 100644 --- a/autoload/vimwiki/html.vim +++ b/autoload/vimwiki/html.vim @@ -1072,7 +1072,9 @@ function! s:process_tag_h(line, id) let h_text = num.' '.h_text endif let h_complete_id = s:escape_html_attribute(h_complete_id) - let h_part = '
' + let h_part .= '' + let h_part .= '
' + let line = h_part.h_text.'' let processed = 1 endif diff --git a/autoload/vimwiki/style.css b/autoload/vimwiki/style.css index 431d15b..a5f11b9 100644 --- a/autoload/vimwiki/style.css +++ b/autoload/vimwiki/style.css @@ -25,6 +25,7 @@ del {text-decoration: line-through; color: #777777;} .justcenter {text-align: center;} .center {margin-left: auto; margin-right: auto;} .tag {background-color: #eeeeee; font-family: monospace; padding: 2px;} +.header a {text-decoration: none; color: inherit;} /* classes for items of todo lists */ .rejected {