aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_help_html.lua
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-12-27 13:43:48 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-12-28 22:41:01 +0100
commit31d7007bf745d3f03902b27c2124d473ec2f8906 (patch)
tree5ceb5f0f0a99a45afbefd239bc625e2eaf4f6f22 /scripts/gen_help_html.lua
parent2b9d3869f8f366399327d01155f557e90038ca97 (diff)
downloadrneovim-31d7007bf745d3f03902b27c2124d473ec2f8906.tar.gz
rneovim-31d7007bf745d3f03902b27c2124d473ec2f8906.tar.bz2
rneovim-31d7007bf745d3f03902b27c2124d473ec2f8906.zip
docs: convert BACKERS.md to backers.txt
There is no reason for this file to be in project root, which is crowded as is. This also fits nicely part of the ongoing work towards gathering as much of the documentation as possible into one place.
Diffstat (limited to 'scripts/gen_help_html.lua')
-rw-r--r--scripts/gen_help_html.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index 8226a0548f..49417e72bb 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -37,6 +37,9 @@ local spell_dict = {
vimL = 'Vimscript',
viml = 'Vimscript',
}
+local spell_ignore_files = {
+ ['backers.txt'] = 'true',
+}
local language = nil
local M = {}
@@ -86,6 +89,7 @@ local exclude_invalid_urls = {
-- Deprecated, brain-damaged files that I don't care about.
local ignore_errors = {
['pi_netrw.txt'] = true,
+ ['backers.txt'] = true,
}
local function tofile(fname, text)
@@ -386,9 +390,10 @@ local function visit_validate(root, level, lang_tree, opt, stats)
and (not vim.tbl_contains({ 'codespan', 'taglink', 'tag' }, parent))
then
local text_nopunct = vim.fn.trim(text, '.,', 0) -- Ignore some punctuation.
- if spell_dict[text_nopunct] then
+ local fname_basename = assert(vim.fs.basename(opt.fname))
+ if spell_dict[text_nopunct] and not spell_ignore_files[fname_basename] then
invalid_spelling[text_nopunct] = invalid_spelling[text_nopunct] or {}
- invalid_spelling[text_nopunct][vim.fs.basename(opt.fname)] = node_text(root:parent())
+ invalid_spelling[text_nopunct][fname_basename] = node_text(root:parent())
end
elseif node_name == 'url' then
local fixed_url, _ = fix_url(trim(text))