From cb24a3907c8d24a898d99042f0f16c8919a2e7ab Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 30 Apr 2024 09:37:45 -0700 Subject: docs: format vim_diff.txt for "flow" layout #28584 --- scripts/gen_help_html.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/gen_help_html.lua') diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua index 43040151eb..8a5afad337 100644 --- a/scripts/gen_help_html.lua +++ b/scripts/gen_help_html.lua @@ -66,10 +66,12 @@ local new_layout = { ['lua.txt'] = true, ['luaref.txt'] = true, ['news.txt'] = true, + ['news-0.9.txt'] = true, ['nvim.txt'] = true, ['pi_health.txt'] = true, ['provider.txt'] = true, ['ui.txt'] = true, + ['vim_diff.txt'] = true, } -- TODO: These known invalid |links| require an update to the relevant docs. -- cgit From ebba7ae095d9bb800c43188df848ac4f4733d167 Mon Sep 17 00:00:00 2001 From: gusain71 <115005392+gusain71@users.noreply.github.com> Date: Tue, 14 May 2024 13:23:43 +0200 Subject: docs(gen_help_html.lua): wrap legacy help at word-boundary #28678 Problem: On the page: https://neovim.io/doc/user/dev_vimpatch.html The links extend beyond the container and thus end up behind the navigation to the right. Solution: Add these lines to get_help_html.lua: white-space: normal; word-wrap: break-word; --- scripts/gen_help_html.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/gen_help_html.lua') diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua index 8a5afad337..7051c8dbc3 100644 --- a/scripts/gen_help_html.lua +++ b/scripts/gen_help_html.lua @@ -1088,13 +1088,13 @@ local function gen_css(fname) padding-bottom: 10px; /* Tabs are used for alignment in old docs, so we must match Vim's 8-char expectation. */ tab-size: 8; - white-space: pre; + white-space: normal; font-size: 16px; font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + word-wrap: break-word; } .old-help-para pre { - /* All text in .old-help-para is formatted as "white-space:pre" so text following
 is
-         already visually separated by the linebreak. */
+      /* Text following 
 is already visually separated by the linebreak. */
       margin-bottom: 0;
     }
 
-- 
cgit 


From 01b6bff7e9bc751be20ce7bb68e7ebe3037441de Mon Sep 17 00:00:00 2001
From: "Justin M. Keyes" 
Date: Thu, 2 May 2024 15:57:21 +0200
Subject: docs: news

Set dev_xx.txt help files to use "flow" layout.
---
 scripts/gen_help_html.lua | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'scripts/gen_help_html.lua')

diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index 7051c8dbc3..d65f3aace2 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -63,10 +63,15 @@ local new_layout = {
   ['channel.txt'] = true,
   ['deprecated.txt'] = true,
   ['develop.txt'] = true,
+  ['dev_style.txt'] = true,
+  ['dev_theme.txt'] = true,
+  ['dev_tools.txt'] = true,
+  ['dev_vimpatch.txt'] = true,
   ['lua.txt'] = true,
   ['luaref.txt'] = true,
   ['news.txt'] = true,
   ['news-0.9.txt'] = true,
+  ['news-0.10.txt'] = true,
   ['nvim.txt'] = true,
   ['pi_health.txt'] = true,
   ['provider.txt'] = true,
-- 
cgit 


From 174da7fe687bd3bf2f6874620e708db24160c4d7 Mon Sep 17 00:00:00 2001
From: Jongwook Choi 
Date: Tue, 14 May 2024 23:34:14 -0400
Subject: docs(gen_help_html.lua): fix broken pre text, and handle linewrap

Problem:

- Since #28678, pre-formatted text in the online documentation do not
  render whitespaces correctly: should be pre-like text, but shown like
  normal paragraph (see #28754).

- Code blocks with long lines should not be wrapped (e.g. see
  |dev-vimpatch-list-management|).

Solution:

- Use `white-space: pre-wrap`. Compared to `white-space: pre`, this
  option will make long lines including a very long URL wrapped.
  This properly fixes #28754 and #28678.

- Use horizontal scrollbar for the code blocks that are horizontally too
  long, instead of wrapping text. This will make the code easy to read
  while the pre-text block not interfering with the navigation bar.
---
 scripts/gen_help_html.lua | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'scripts/gen_help_html.lua')

diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index d65f3aace2..7432f5ecc4 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -1093,14 +1093,19 @@ local function gen_css(fname)
       padding-bottom: 10px;
       /* Tabs are used for alignment in old docs, so we must match Vim's 8-char expectation. */
       tab-size: 8;
-      white-space: normal;
+      white-space: pre-wrap;
       font-size: 16px;
       font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
       word-wrap: break-word;
     }
-    .old-help-para pre {
+    .old-help-para pre, .old-help-para pre:hover {
       /* Text following 
 is already visually separated by the linebreak. */
       margin-bottom: 0;
+      /* Long lines that exceed the textwidth should not be wrapped (no "pre-wrap").
+         Since text may overflow horizontally, we make the contents to be scrollable
+         (only if necessary) to prevent overlapping with the navigation bar at the right. */
+      white-space: pre;
+      overflow-x: auto;
     }
 
     /* TODO: should this rule be deleted? help tags are rendered as  or , not  */
-- 
cgit 


From 668b5fc155af0289c21eabb304c711634472dea8 Mon Sep 17 00:00:00 2001
From: "Justin M. Keyes" 
Date: Thu, 16 May 2024 01:53:33 -0700
Subject: docs: nvim.appdata.xml, set faq to "flow" layout #28769

---
 scripts/gen_help_html.lua | 1 +
 1 file changed, 1 insertion(+)

(limited to 'scripts/gen_help_html.lua')

diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index 7432f5ecc4..9f8b0f18ca 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -67,6 +67,7 @@ local new_layout = {
   ['dev_theme.txt'] = true,
   ['dev_tools.txt'] = true,
   ['dev_vimpatch.txt'] = true,
+  ['faq.txt'] = true,
   ['lua.txt'] = true,
   ['luaref.txt'] = true,
   ['news.txt'] = true,
-- 
cgit 


From 31dc6279693886a628119cd6c779e580faab32fd Mon Sep 17 00:00:00 2001
From: "Justin M. Keyes" 
Date: Thu, 16 May 2024 06:28:27 -0700
Subject: docs: news #28773

---
 scripts/gen_help_html.lua | 1 +
 1 file changed, 1 insertion(+)

(limited to 'scripts/gen_help_html.lua')

diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index 9f8b0f18ca..b33a94dca5 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -50,6 +50,7 @@ local spell_dict = {
 local spell_ignore_files = {
   ['backers.txt'] = true,
   ['news.txt'] = { 'tree-sitter' }, -- in news, may refer to the upstream "tree-sitter" library
+  ['news-0.10.txt'] = { 'tree-sitter' },
 }
 local language = nil
 
-- 
cgit 


From 878dcf19807ad880fadac200b65619e237492460 Mon Sep 17 00:00:00 2001
From: Jongwook Choi 
Date: Wed, 15 May 2024 21:53:14 -0400
Subject: docs(gen_help_html.lua): handle modeline and note nodes

Problem:

'modeline' and 'note' are unhandled in the online HTML documentation.

Some (not all) modelines are parsed by the vimdoc parser as a node of
type 'modeline'.

Solution:

- Ignore 'modeline' in HTML rendering.
- Render 'note' text in boldface.
---
 scripts/gen_help_html.lua | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'scripts/gen_help_html.lua')

diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index b33a94dca5..b712cf1475 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -532,6 +532,8 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
     return ('%s%s%s'):format(ws(), fixed_url, fixed_url, removed_chars)
   elseif node_name == 'word' or node_name == 'uppercase_name' then
     return text
+  elseif node_name == 'note' then
+    return ('%s'):format(text)
   elseif node_name == 'h1' or node_name == 'h2' or node_name == 'h3' then
     if is_noise(text, stats.noise_lines) then
       return '' -- Discard common "noise" lines.
@@ -694,6 +696,8 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
       return string.format('%s', s)
     end
     return s
+  elseif node_name == 'modeline' then
+    return ''
   elseif node_name == 'ERROR' then
     if ignore_parse_error(opt.fname, trimmed) then
       return text
-- 
cgit 


From e8f7025de1d8b7c8bbe747736e4c46dcd6e73133 Mon Sep 17 00:00:00 2001
From: dundargoc 
Date: Wed, 22 May 2024 16:07:45 +0200
Subject: docs: move vim.health documentation to lua.txt

`vim.health` is not a "plugin" but part of our Lua API and the
documentation should reflect that. This also helps make the
documentation maintenance easier as it is now generated.
---
 scripts/gen_help_html.lua | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'scripts/gen_help_html.lua')

diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index b712cf1475..2a8f8308ac 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -75,7 +75,6 @@ local new_layout = {
   ['news-0.9.txt'] = true,
   ['news-0.10.txt'] = true,
   ['nvim.txt'] = true,
-  ['pi_health.txt'] = true,
   ['provider.txt'] = true,
   ['ui.txt'] = true,
   ['vim_diff.txt'] = true,
@@ -1440,9 +1439,9 @@ function M.test_gen(help_dir)
     help_dir,
     tmpdir,
     -- Because gen() is slow (~30s), this test is limited to a few files.
-    { 'pi_health.txt', 'help.txt', 'index.txt', 'nvim.txt' }
+    { 'help.txt', 'index.txt', 'nvim.txt' }
   )
-  eq(4, #rv.helpfiles)
+  eq(3, #rv.helpfiles)
   eq(0, rv.err_count, 'parse errors in :help docs')
   eq({}, rv.invalid_links, 'invalid tags in :help docs')
 end
-- 
cgit 


From c614969570ac13cfc1ff6642fcaf56ebce6d40be Mon Sep 17 00:00:00 2001
From: Saien Govender <35043617+saitheninja@users.noreply.github.com>
Date: Thu, 23 May 2024 15:20:29 +0200
Subject: build(docs): update CSS #28896

Problem:
Not using minified version of bootstrap.
Don't need to load normalize with new version of bootstrap.
See https://github.com/neovim/neovim.github.io/pull/350

Solution:
Update link to bootstrap file.
Remove link to normalize.
---
 scripts/gen_help_html.lua | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'scripts/gen_help_html.lua')

diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index 2a8f8308ac..b61f01f124 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -836,8 +836,7 @@ local function gen_one(fname, to_fname, old, commit, parser_path)
     
     
 
-    
-    
+    
     
     
     
-- 
cgit 


From 6dc62c2e2b413a9bbaf0746660c5638936303249 Mon Sep 17 00:00:00 2001
From: dundargoc 
Date: Thu, 23 May 2024 11:40:51 +0200
Subject: docs: extract health to its own file

---
 scripts/gen_help_html.lua | 1 -
 1 file changed, 1 deletion(-)

(limited to 'scripts/gen_help_html.lua')

diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index b61f01f124..cdfb85bde6 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -1440,7 +1440,6 @@ function M.test_gen(help_dir)
     -- Because gen() is slow (~30s), this test is limited to a few files.
     { 'help.txt', 'index.txt', 'nvim.txt' }
   )
-  eq(3, #rv.helpfiles)
   eq(0, rv.err_count, 'parse errors in :help docs')
   eq({}, rv.invalid_links, 'invalid tags in :help docs')
 end
-- 
cgit