From bf4bf7f9e034ca2262e53e347ecb87054aa688d7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 3 Dec 2022 20:46:01 +0800 Subject: vim-patch:9.0.0110: help tag generation picks up words in code examples Problem: Help tag generation picks up words in code examples. Solution: Skip over examples. (Carlo Teubner, closes vim/vim#10813) https://github.com/vim/vim/commit/ddab3ce3457aadffb16ce0127f67a99966a065a8 Also fix mistakes in help files. Co-authored-by: Carlo Teubner --- src/nvim/testdir/test_help.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_help.vim b/src/nvim/testdir/test_help.vim index 6cebc49b61..08dd3dcb9a 100644 --- a/src/nvim/testdir/test_help.vim +++ b/src/nvim/testdir/test_help.vim @@ -156,6 +156,13 @@ func Test_helptag_cmd() call assert_equal(["help-tags\ttags\t1"], readfile('Xdir/tags')) call delete('Xdir/tags') + " Test parsing tags + call writefile(['*tag1*', 'Example: >', ' *notag*', 'Example end: *tag2*'], + \ 'Xdir/a/doc/sample.txt') + helptags Xdir + call assert_equal(["tag1\ta/doc/sample.txt\t/*tag1*", + \ "tag2\ta/doc/sample.txt\t/*tag2*"], readfile('Xdir/tags')) + " Duplicate tags in the help file call writefile(['*tag1*', '*tag1*', '*tag2*'], 'Xdir/a/doc/sample.txt') call assert_fails('helptags Xdir', 'E154:') -- cgit