From bd5b2bc6eb1ba5da90baa13a3bbfe475661ee94b Mon Sep 17 00:00:00 2001 From: Daniel Ashbrook Date: Sat, 17 Jul 2021 22:55:28 +0200 Subject: [PATCH 1/3] Replace hardcoded Norwegian with variable --- autoload/wiki/page.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/wiki/page.vim b/autoload/wiki/page.vim index 16601d89..5afe487d 100644 --- a/autoload/wiki/page.vim +++ b/autoload/wiki/page.vim @@ -253,7 +253,7 @@ function! wiki#page#gather_toc_entries(local) abort " {{{1 " Parse current header let l:level = len(matchstr(l:line, '^#*')) let l:header = matchlist(l:line, g:wiki#rx#header_items)[2] - if l:header ==# 'Innhald' | continue | endif + if l:header ==# g:wiki_toc_title | continue | endif " Update header stack in order to have well defined anchor let l:depth = len(l:anchor_stack) From 99e42a921cb156b06bb4754d5d5885a8fefcc473 Mon Sep 17 00:00:00 2001 From: Daniel Ashbrook Date: Sat, 17 Jul 2021 22:55:47 +0200 Subject: [PATCH 2/3] Minor spelling correction --- doc/wiki.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/wiki.txt b/doc/wiki.txt index 7a5c246b..8530a662 100644 --- a/doc/wiki.txt +++ b/doc/wiki.txt @@ -158,7 +158,7 @@ OPTIONS *wiki-config-options* `Windows`: Standard temporary folder (based on |tempname()|) *g:wiki_cache_persistent* - Specify whether to use persistant caching. + Specify whether to use persistent caching. Default value: 1 From 61f793d9005a5c670e04bd1de1e89a8b081738ad Mon Sep 17 00:00:00 2001 From: Daniel Ashbrook Date: Sat, 17 Jul 2021 22:58:08 +0200 Subject: [PATCH 3/3] Extract line number `l:origin[1]` is the results of `getpos(.)`, not just a line number, causing an error on template rendering --- autoload/wiki/template.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/wiki/template.vim b/autoload/wiki/template.vim index 71153278..a50d136b 100644 --- a/autoload/wiki/template.vim +++ b/autoload/wiki/template.vim @@ -13,7 +13,7 @@ function! wiki#template#init() abort " {{{1 \ 'date': strftime("%F"), \ 'name': expand('%:t:r'), \ 'origin_file': l:origin[0], - \ 'origin_lnum': l:origin[1], + \ 'origin_lnum': l:origin[1][1], \ 'path': expand('%:p'), \ 'path_wiki': wiki#paths#shorten_relative(expand('%:p')), \ 'time': strftime("%H:%M"),