From 09b64d75bd92a95d89c4f39f9df7918760abe98d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 27 Mar 2022 19:47:34 -0700 Subject: feat(docs): gen_help_html.lua MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: The :help docs HTML generated is driven by an old awk script `runtime/doc/makehtml.awk` that is hard to maintain (ad hoc parser and no one has touched it in decades) and has bugs like: - https://github.com/neovim/neovim.github.io/issues/96 - https://github.com/neovim/neovim.github.io/issues/97 Solution: Use Lua + treesitter (https://github.com/vigoux/tree-sitter-vimdoc) to generate :help docs HTML. Also validates tag links. fix https://github.com/neovim/neovim.github.io/issues/96 fix https://github.com/neovim/neovim.github.io/issues/97 TODO: - delete doc_html build task - delete runtime/doc/Makefile - delete makehtml.awk - delete maketags.awk OUTPUT: $ nvim -V1 -es --clean +"lua require('scripts.gen_help_html')" output dir: /…/neovim.github.io/_site/doc/ generated (207 errors): api.txt => api.html generated (122 errors): arabic.txt => arabic.html generated (285 errors): autocmd.txt => autocmd.html generated (641 errors): builtin.txt => builtin.html generated (623 errors): change.txt => change.html generated (65 errors): channel.txt => channel.html generated (353 errors): cmdline.txt => cmdline.html generated (3 errors): debug.txt => debug.html generated (28 errors): deprecated.txt => deprecated.html generated (193 errors): dev_style.txt => dev_style.html generated (460 errors): develop.txt => develop.html generated (19 errors): diagnostic.txt => diagnostic.html generated (57 errors): diff.txt => diff.html generated (818 errors): digraph.txt => digraph.html generated (330 errors): editing.txt => editing.html generated (368 errors): eval.txt => eval.html generated (184 errors): fold.txt => fold.html generated (61 errors): ft_ada.txt => ft_ada.html generated (0 errors): ft_ps1.txt => ft_ps1.html generated (20 errors): ft_raku.txt => ft_raku.html generated (5 errors): ft_rust.txt => ft_rust.html generated (41 errors): ft_sql.txt => ft_sql.html generated (110 errors): gui.txt => gui.html generated (79 errors): hebrew.txt => hebrew.html generated (17 errors): help.txt => index.html generated (104 errors): helphelp.txt => helphelp.html generated (0 errors): if_cscop.txt => if_cscop.html generated (23 errors): if_perl.txt => if_perl.html generated (16 errors): if_pyth.txt => if_pyth.html generated (9 errors): if_ruby.txt => if_ruby.html generated (216 errors): indent.txt => indent.html generated (634 errors): index.txt => vimindex.html generated (320 errors): insert.txt => insert.html generated (265 errors): intro.txt => intro.html generated (9 errors): job_control.txt => job_control.html generated (0 errors): lsp-extension.txt => lsp-extension.html generated (214 errors): lsp.txt => lsp.html generated (311 errors): lua.txt => lua.html generated (592 errors): luaref.txt => luaref.html generated (798 errors): luvref.txt => luvref.html generated (663 errors): map.txt => map.html generated (228 errors): mbyte.txt => mbyte.html generated (228 errors): message.txt => message.html generated (0 errors): mlang.txt => mlang.html generated (761 errors): motion.txt => motion.html generated (4 errors): nvim.txt => nvim.html generated (226 errors): nvim_terminal_emulator.txt => nvim_terminal_emulator.html generated (988 errors): options.txt => options.html generated (567 errors): pattern.txt => pattern.html generated (15 errors): pi_gzip.txt => pi_gzip.html generated (10 errors): pi_health.txt => pi_health.html generated (27 errors): pi_msgpack.txt => pi_msgpack.html generated (2177 errors): pi_netrw.txt => pi_netrw.html generated (41 errors): pi_paren.txt => pi_paren.html generated (9 errors): pi_spec.txt => pi_spec.html generated (218 errors): pi_tar.txt => pi_tar.html generated (0 errors): pi_tutor.txt => pi_tutor.html generated (235 errors): pi_zip.txt => pi_zip.html generated (265 errors): print.txt => print.html generated (31 errors): provider.txt => provider.html generated (335 errors): quickfix.txt => quickfix.html generated (572 errors): quickref.txt => quickref.html generated (109 errors): recover.txt => recover.html generated (14 errors): remote.txt => remote.html generated (14 errors): remote_plugin.txt => remote_plugin.html generated (351 errors): repeat.txt => repeat.html generated (23 errors): rileft.txt => rileft.html generated (12 errors): russian.txt => russian.html generated (6 errors): scroll.txt => scroll.html generated (106 errors): sign.txt => sign.html generated (347 errors): spell.txt => spell.html generated (784 errors): starting.txt => starting.html generated (1499 errors): syntax.txt => syntax.html generated (23 errors): tabpage.txt => tabpage.html generated (257 errors): tagsrch.txt => tagsrch.html generated (31 errors): term.txt => term.html generated (0 errors): testing.txt => testing.html generated (96 errors): tips.txt => tips.html generated (57 errors): treesitter.txt => treesitter.html generated (71 errors): uganda.txt => uganda.html generated (74 errors): ui.txt => ui.html generated (87 errors): undo.txt => undo.html generated (17 errors): userfunc.txt => userfunc.html generated (1 errors): usr_01.txt => usr_01.html generated (89 errors): usr_02.txt => usr_02.html generated (293 errors): usr_03.txt => usr_03.html generated (46 errors): usr_04.txt => usr_04.html generated (96 errors): usr_05.txt => usr_05.html generated (54 errors): usr_06.txt => usr_06.html generated (20 errors): usr_07.txt => usr_07.html generated (241 errors): usr_08.txt => usr_08.html generated (130 errors): usr_09.txt => usr_09.html generated (50 errors): usr_10.txt => usr_10.html generated (33 errors): usr_11.txt => usr_11.html generated (32 errors): usr_12.txt => usr_12.html generated (22 errors): usr_20.txt => usr_20.html generated (75 errors): usr_21.txt => usr_21.html generated (8 errors): usr_22.txt => usr_22.html generated (3 errors): usr_23.txt => usr_23.html generated (163 errors): usr_25.txt => usr_25.html generated (13 errors): usr_26.txt => usr_26.html generated (84 errors): usr_27.txt => usr_27.html generated (173 errors): usr_28.txt => usr_28.html generated (285 errors): usr_29.txt => usr_29.html generated (280 errors): usr_30.txt => usr_30.html generated (11 errors): usr_31.txt => usr_31.html generated (13 errors): usr_32.txt => usr_32.html generated (156 errors): usr_40.txt => usr_40.html generated (134 errors): usr_41.txt => usr_41.html generated (35 errors): usr_42.txt => usr_42.html generated (19 errors): usr_43.txt => usr_43.html generated (60 errors): usr_44.txt => usr_44.html generated (13 errors): usr_45.txt => usr_45.html generated (1 errors): usr_toc.txt => usr_toc.html generated (69 errors): various.txt => various.html generated (68 errors): vi_diff.txt => vi_diff.html generated (437 errors): vim_diff.txt => vim_diff.html generated (296 errors): visual.txt => visual.html generated (181 errors): windows.txt => windows.html generated 119 html pages total errors: 23862 invalid tags: 537 --- test/functional/lua/help_spec.lua | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 test/functional/lua/help_spec.lua (limited to 'test/functional/lua/help_spec.lua') diff --git a/test/functional/lua/help_spec.lua b/test/functional/lua/help_spec.lua new file mode 100644 index 0000000000..266f261ab9 --- /dev/null +++ b/test/functional/lua/help_spec.lua @@ -0,0 +1,54 @@ +-- Tests for gen_help_html.lua. Validates :help tags/links and HTML doc generation. +-- +-- TODO: extract parts of gen_help_html.lua into Nvim stdlib? + +local helpers = require('test.functional.helpers')(after_each) +local clear = helpers.clear +local exec_lua = helpers.exec_lua +local eq = helpers.eq +local ok = helpers.ok + +describe(':help docs', function() + before_each(clear) + it('validate', function() + -- If this test fails, try these steps (in order): + -- 1. Try to fix/cleanup the :help docs, especially Nvim-owned :help docs. + -- 2. Try to fix the parser: https://github.com/vigoux/tree-sitter-vimdoc + -- 3. File a parser bug, and adjust the tolerance of this test in the meantime. + + local rv = exec_lua([[return require('scripts.gen_help_html').validate('./build/runtime/doc')]]) + -- Check that parse errors did not increase wildly. + -- TODO: yes, there are currently 24k+ parser errors. + -- WIP: https://github.com/vigoux/tree-sitter-vimdoc/pull/16 + ok(rv.err_count < 24000, '<24000', rv.err_count) + -- TODO: should be eq(0, …) + ok(exec_lua('return vim.tbl_count(...)', rv.invalid_tags) < 538, '<538', + exec_lua('return vim.inspect(...)', rv.invalid_tags)) + end) + + it('gen_help_html.lua generates HTML', function() + -- Test: + -- 1. Check that parse errors did not increase wildly. Because we explicitly test only a few + -- :help files, we can be more precise about the tolerances here. + -- 2. exercise gen_help_html.lua, check that it actually works. + -- 3. check that its tree-sitter-vimdoc dependency is working. + + local tmpdir = exec_lua('return vim.fs.dirname(vim.fn.tempname())') + -- Because gen() is slow (1 min), this test is limited to a few files. + local rv = exec_lua([[ + local to_dir = ... + return require('scripts.gen_help_html').gen( + './build/runtime/doc', + to_dir, + { 'pi_health.txt', 'help.txt', 'index.txt', 'nvim.txt', } + ) + ]], + tmpdir + ) + eq(4, #rv.helpfiles) + ok(rv.err_count < 700, '<700', rv.err_count) + -- TODO: should be eq(0, …) + ok(exec_lua('return vim.tbl_count(...)', rv.invalid_tags) <= 32, '<=32', + exec_lua('return vim.inspect(...)', rv.invalid_tags)) + end) +end) -- cgit From 16336c486ecb5a60e85a870904316308c7d7fc3f Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 25 Sep 2022 02:20:47 +0200 Subject: feat(gen_help_html.lua): adapt to new parser - adapt to parser changes from https://github.com/vigoux/tree-sitter-vimdoc/pull/16 - numerous other generator improvements --- test/functional/lua/help_spec.lua | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'test/functional/lua/help_spec.lua') diff --git a/test/functional/lua/help_spec.lua b/test/functional/lua/help_spec.lua index 266f261ab9..2ddabc15ae 100644 --- a/test/functional/lua/help_spec.lua +++ b/test/functional/lua/help_spec.lua @@ -12,29 +12,26 @@ describe(':help docs', function() before_each(clear) it('validate', function() -- If this test fails, try these steps (in order): - -- 1. Try to fix/cleanup the :help docs, especially Nvim-owned :help docs. - -- 2. Try to fix the parser: https://github.com/vigoux/tree-sitter-vimdoc + -- 1. Fix/cleanup the :help docs. + -- 2. Fix the parser: https://github.com/neovim/tree-sitter-vimdoc -- 3. File a parser bug, and adjust the tolerance of this test in the meantime. local rv = exec_lua([[return require('scripts.gen_help_html').validate('./build/runtime/doc')]]) + -- Check that we actually found helpfiles. + ok(rv.helpfiles > 100, '>100 :help files', rv.helpfiles) -- Check that parse errors did not increase wildly. - -- TODO: yes, there are currently 24k+ parser errors. - -- WIP: https://github.com/vigoux/tree-sitter-vimdoc/pull/16 - ok(rv.err_count < 24000, '<24000', rv.err_count) - -- TODO: should be eq(0, …) - ok(exec_lua('return vim.tbl_count(...)', rv.invalid_tags) < 538, '<538', - exec_lua('return vim.inspect(...)', rv.invalid_tags)) + -- TODO: Fix all parse errors in :help files. + ok(rv.err_count < 1300, '<1300 parse errors', rv.err_count) + eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) end) it('gen_help_html.lua generates HTML', function() - -- Test: - -- 1. Check that parse errors did not increase wildly. Because we explicitly test only a few - -- :help files, we can be more precise about the tolerances here. - -- 2. exercise gen_help_html.lua, check that it actually works. - -- 3. check that its tree-sitter-vimdoc dependency is working. + -- 1. Test that gen_help_html.lua actually works. + -- 2. Test that parse errors did not increase wildly. Because we explicitly test only a few + -- :help files, we can be precise about the tolerances here. local tmpdir = exec_lua('return vim.fs.dirname(vim.fn.tempname())') - -- Because gen() is slow (1 min), this test is limited to a few files. + -- Because gen() is slow (~30s), this test is limited to a few files. local rv = exec_lua([[ local to_dir = ... return require('scripts.gen_help_html').gen( @@ -46,9 +43,7 @@ describe(':help docs', function() tmpdir ) eq(4, #rv.helpfiles) - ok(rv.err_count < 700, '<700', rv.err_count) - -- TODO: should be eq(0, …) - ok(exec_lua('return vim.tbl_count(...)', rv.invalid_tags) <= 32, '<=32', - exec_lua('return vim.inspect(...)', rv.invalid_tags)) + ok(rv.err_count < 16, '<16 parse errors', rv.err_count) + eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) end) end) -- cgit From 563bc39aac10185a03e74faa8f992ce2d10f68e8 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 29 Sep 2022 12:08:49 +0200 Subject: feat(docs): fixes for :help HTML generator Generate correct leading whitespace for argument, taglink, tag, etc. --- test/functional/lua/help_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/lua/help_spec.lua') diff --git a/test/functional/lua/help_spec.lua b/test/functional/lua/help_spec.lua index 2ddabc15ae..a00aaea9d2 100644 --- a/test/functional/lua/help_spec.lua +++ b/test/functional/lua/help_spec.lua @@ -21,7 +21,7 @@ describe(':help docs', function() ok(rv.helpfiles > 100, '>100 :help files', rv.helpfiles) -- Check that parse errors did not increase wildly. -- TODO: Fix all parse errors in :help files. - ok(rv.err_count < 1300, '<1300 parse errors', rv.err_count) + ok(rv.err_count < 250, '<250 parse errors', rv.err_count) eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) end) @@ -43,7 +43,7 @@ describe(':help docs', function() tmpdir ) eq(4, #rv.helpfiles) - ok(rv.err_count < 16, '<16 parse errors', rv.err_count) + ok(rv.err_count <= 6, '<=6 parse errors', rv.err_count) eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) end) end) -- cgit From 088abbeb6e6aecfc34b42db9b8d1396f493a2466 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 29 Sep 2022 13:46:44 +0200 Subject: feat(docs): nested lists in HTML, update :help parser - Docs HTML: improvements in https://github.com/neovim/tree-sitter-vimdoc allow us to many hacks in `gen_help_html.lua`. - Docs HTML: support nested lists. - Docs HTML: avoid extra newlines (too much whitespace) in old (preformatted) layout. - Docs HTML: disable golden-grid for narrow viewport. - Workaround for https://github.com/neovim/neovim/issues/20404 closes https://github.com/neovim/neovim/issues/20404 --- test/functional/lua/help_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/lua/help_spec.lua') diff --git a/test/functional/lua/help_spec.lua b/test/functional/lua/help_spec.lua index a00aaea9d2..6743648819 100644 --- a/test/functional/lua/help_spec.lua +++ b/test/functional/lua/help_spec.lua @@ -21,7 +21,7 @@ describe(':help docs', function() ok(rv.helpfiles > 100, '>100 :help files', rv.helpfiles) -- Check that parse errors did not increase wildly. -- TODO: Fix all parse errors in :help files. - ok(rv.err_count < 250, '<250 parse errors', rv.err_count) + ok(rv.err_count < 280, '<280 parse errors', rv.err_count) eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) end) -- cgit From f7b175e049db9262a45ee1c5eb41a38bd5b8ac38 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 6 Oct 2022 09:16:00 -0400 Subject: fix(docs-html): keycodes, taglinks, column_heading #20498 Problem: - Docs HTML: "foo ~" headings (column_heading) are not aligned with their table columns/contents because the leading whitespace is not emitted. - taglinks starting with hyphen like |-x| were not recognized. - keycodes like `` and `CTRL-x` were not recognized. - ToC is not scrollable. Solution: - Add ws() to the column_heading case. - Update help parser to latest version - supports `keycode` - fixes for taglink, argument - Update .toc CSS. https://github.com/neovim/neovim.github.io/issues/297 fix https://github.com/neovim/neovim.github.io/issues/297 --- test/functional/lua/help_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/lua/help_spec.lua') diff --git a/test/functional/lua/help_spec.lua b/test/functional/lua/help_spec.lua index 6743648819..251275b5cc 100644 --- a/test/functional/lua/help_spec.lua +++ b/test/functional/lua/help_spec.lua @@ -21,7 +21,7 @@ describe(':help docs', function() ok(rv.helpfiles > 100, '>100 :help files', rv.helpfiles) -- Check that parse errors did not increase wildly. -- TODO: Fix all parse errors in :help files. - ok(rv.err_count < 280, '<280 parse errors', rv.err_count) + ok(rv.err_count < 150, '<150 parse errors', rv.err_count) eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) end) @@ -43,7 +43,7 @@ describe(':help docs', function() tmpdir ) eq(4, #rv.helpfiles) - ok(rv.err_count <= 6, '<=6 parse errors', rv.err_count) + ok(rv.err_count <= 1, '<=1 parse errors', rv.err_count) eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) end) end) -- cgit From d339b4aad7461937e1e03ac0836b2eb1354ff442 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 13 Oct 2022 21:36:25 -0400 Subject: build(deps): bump vimdoc (help) parser to v1.2.1 #20642 --- test/functional/lua/help_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/lua/help_spec.lua') diff --git a/test/functional/lua/help_spec.lua b/test/functional/lua/help_spec.lua index 251275b5cc..242897336d 100644 --- a/test/functional/lua/help_spec.lua +++ b/test/functional/lua/help_spec.lua @@ -21,7 +21,7 @@ describe(':help docs', function() ok(rv.helpfiles > 100, '>100 :help files', rv.helpfiles) -- Check that parse errors did not increase wildly. -- TODO: Fix all parse errors in :help files. - ok(rv.err_count < 150, '<150 parse errors', rv.err_count) + ok(rv.err_count < 100, '<100 parse errors', rv.err_count) eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) end) @@ -43,7 +43,7 @@ describe(':help docs', function() tmpdir ) eq(4, #rv.helpfiles) - ok(rv.err_count <= 1, '<=1 parse errors', rv.err_count) + ok(rv.err_count == 0, '0 parse errors', rv.err_count) eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) end) end) -- cgit From ef4c339fb9de87f7534303e006c281e40327f803 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 18 Oct 2022 10:18:44 -0400 Subject: feat(docs): update parser, HTML gen #20720 Note: although the tolerance in help_spec.lua increased, the actual error count with the new parser decreased by about 20%. The difference is that the old ignore_parse_error() ignored many more errors with the old parser. fix https://github.com/neovim/tree-sitter-vimdoc/issues/37 fix https://github.com/neovim/tree-sitter-vimdoc/issues/44 fix https://github.com/neovim/tree-sitter-vimdoc/issues/47 --- test/functional/lua/help_spec.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/functional/lua/help_spec.lua') diff --git a/test/functional/lua/help_spec.lua b/test/functional/lua/help_spec.lua index 242897336d..f5e67ec636 100644 --- a/test/functional/lua/help_spec.lua +++ b/test/functional/lua/help_spec.lua @@ -19,10 +19,11 @@ describe(':help docs', function() local rv = exec_lua([[return require('scripts.gen_help_html').validate('./build/runtime/doc')]]) -- Check that we actually found helpfiles. ok(rv.helpfiles > 100, '>100 :help files', rv.helpfiles) + eq({}, rv.invalid_links, 'found invalid :help tag links') + eq({}, rv.invalid_urls, 'found invalid URLs in :help docs') -- Check that parse errors did not increase wildly. -- TODO: Fix all parse errors in :help files. - ok(rv.err_count < 100, '<100 parse errors', rv.err_count) - eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) + ok(rv.err_count < 350, '<350 parse errors', rv.err_count) end) it('gen_help_html.lua generates HTML', function() @@ -43,7 +44,7 @@ describe(':help docs', function() tmpdir ) eq(4, #rv.helpfiles) - ok(rv.err_count == 0, '0 parse errors', rv.err_count) - eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) + ok(rv.err_count < 25, '<25 parse errors', rv.err_count) + eq({}, rv.invalid_links, 'found invalid :help tag links') end) end) -- cgit From e6917306f6d3ba99747d14bea3f0b078631c5c0e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 20 Oct 2022 09:20:02 -0400 Subject: docs: update vimdoc parser #20747 Remove the user-manual ToC from help.txt, because: 1. it duplicates usr_toc.txt 2. it is not what most readers are looking for in the main help page. fix https://github.com/neovim/tree-sitter-vimdoc/issues/49 fix https://github.com/neovim/tree-sitter-vimdoc/issues/50 fix https://github.com/neovim/tree-sitter-vimdoc/issues/51 --- test/functional/lua/help_spec.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/functional/lua/help_spec.lua') diff --git a/test/functional/lua/help_spec.lua b/test/functional/lua/help_spec.lua index f5e67ec636..b396e2ba30 100644 --- a/test/functional/lua/help_spec.lua +++ b/test/functional/lua/help_spec.lua @@ -19,11 +19,11 @@ describe(':help docs', function() local rv = exec_lua([[return require('scripts.gen_help_html').validate('./build/runtime/doc')]]) -- Check that we actually found helpfiles. ok(rv.helpfiles > 100, '>100 :help files', rv.helpfiles) - eq({}, rv.invalid_links, 'found invalid :help tag links') - eq({}, rv.invalid_urls, 'found invalid URLs in :help docs') + eq({}, rv.invalid_links, 'invalid tags in :help docs') + eq({}, rv.invalid_urls, 'invalid URLs in :help docs') -- Check that parse errors did not increase wildly. -- TODO: Fix all parse errors in :help files. - ok(rv.err_count < 350, '<350 parse errors', rv.err_count) + ok(rv.err_count < 250, '<250 parse errors', rv.err_count) end) it('gen_help_html.lua generates HTML', function() @@ -44,7 +44,7 @@ describe(':help docs', function() tmpdir ) eq(4, #rv.helpfiles) - ok(rv.err_count < 25, '<25 parse errors', rv.err_count) - eq({}, rv.invalid_links, 'found invalid :help tag links') + eq(0, rv.err_count, 'parse errors in :help docs') + eq({}, rv.invalid_links, 'invalid tags in :help docs') end) end) -- cgit