-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
docs(gen_help_html.lua): fix broken pre text, and handle linewrap #28755
Conversation
This PR has a slightly different result than the "word-break" solution #28678: but it should be a pretty reasonable rendering. Also, codeblocks will now look like "nowrap": instead of, for example: https://neovim.io/doc/user/dev_vimpatch.html#dev-vimpatch-list-management |
Apropos: while you're at it, can you add handling for the nodes
(Not a blocker; just wanted to make a note for the record.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definitely a needed fix since the previous PR, thanks.
BTW (off topic): dev_vimpatch
should use "flow" layout. Fixed: #28747
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.
Anything missing before 0.10? |
(The 0.10 release is unrelated because the docs are always generated from HEAD.) |
Problem:
Since docs(gen_help_html.lua): wrap legacy help at word-boundary #28678, pre-formatted text in the online documentation do not
render whitespaces correctly: should be pre-like text, but shown like
normal paragraph (see Online documentation contains strange wrapping #28754).
Code blocks with long lines should not be wrapped (e.g. see
|dev-vimpatch-list-management|).
Solution:
Use
white-space: pre-wrap
. Compared towhite-space: pre
, thisoption will make long lines including a very long URL wrapped.
This properly fixes Online documentation contains strange wrapping #28754 as well as docs(gen_help_html.lua): wrap legacy help at word-boundary #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.