Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Online documentation contains strange wrapping #28754

Closed
rphodges opened this issue May 15, 2024 · 3 comments · Fixed by #28755
Closed

Online documentation contains strange wrapping #28754

rphodges opened this issue May 15, 2024 · 3 comments · Fixed by #28755
Labels
bug issues reporting wrong behavior documentation

Comments

@rphodges
Copy link

Problem

Online documentation is wrapped strangely. For example on this page:

https://neovim.io/doc/user/

you see text jumbled together in a paragraph. For instance, each section should be formatted like a table. In the 'Basic Editing' section 'starting' should be in the first column and its corresponding description is in the second column. In the next line you should see 'edit-files' and its corresponding description. Instead all the subsections are joined together in a paragraph.

Pages like https://neovim.io/doc/user/insert.html#insert.txt are also hard to read.

I didn't take the time to examine the script that generates the online manuals. However, I did see a recent commit to it in regards to word wrapping.

Steps to reproduce

View the reference manual online.

Expected behavior

I expect the the contents of the online user manual to be formatted/wrapped similarly to the how neovim shows the same manual.

Neovim version (nvim -v)

Not applicable

Vim (not Nvim) behaves the same?

Not applicable

Operating system/version

Not applicable

Terminal name/version

Not applicable

$TERM environment variable

Not applicable

Installation

Not applicable

@rphodges rphodges added the bug issues reporting wrong behavior label May 15, 2024
@wookayin
Copy link
Member

wookayin commented May 15, 2024

Current behavior:

before

Expected behavior:

after

This is a regression from #28678.

 .old-help-para {
-    white-space: word-wrap;
+    white-space: pre;
 }

would fix the problem. (But needs to find a solution that is compatible with #28678)

@wookayin wookayin added this to the 0.10 milestone May 15, 2024
@BBboy01
Copy link

BBboy01 commented May 15, 2024

word-wrap: break-word;

this already makes long word will not overflow the container

@wookayin
Copy link
Member

wookayin commented May 15, 2024

No, word-wrap: break-word alone doesn't fix the overflow. #28755

wookayin added a commit to wookayin/neovim that referenced this issue May 15, 2024
Problem:

- Since neovim#28678, pre-formatted text in the online documentation do not
  render whitespaces correctly: should be pre-like text, but shown like
  normal paragraph (see neovim#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 neovim#28678 as well as neovim#28754.

- 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 interferring with the navigation bar.
wookayin added a commit to wookayin/neovim that referenced this issue May 15, 2024
Problem:

- Since neovim#28678, pre-formatted text in the online documentation do not
  render whitespaces correctly: should be pre-like text, but shown like
  normal paragraph (see neovim#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 neovim#28754 as well as neovim#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.
@wookayin wookayin removed this from the 0.10 milestone May 15, 2024
wookayin added a commit to wookayin/neovim that referenced this issue May 15, 2024
Problem:

- Since neovim#28678, pre-formatted text in the online documentation do not
  render whitespaces correctly: should be pre-like text, but shown like
  normal paragraph (see neovim#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 neovim#28754 and neovim#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.
clason pushed a commit that referenced this issue May 16, 2024
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.
icholy pushed a commit to icholy/neovim that referenced this issue May 17, 2024
Problem:

- Since neovim#28678, pre-formatted text in the online documentation do not
  render whitespaces correctly: should be pre-like text, but shown like
  normal paragraph (see neovim#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 neovim#28754 and neovim#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants