mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	feat(docs): update parser, HTML gen
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
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Justin M. Keyes
					Justin M. Keyes