docs: fix kernel-driver-statement rendering
Subsystems (6)
cover docs: fix kernel-driver-statement rendering
Dear Documentation maintainers,
while browsing the "Kernel driver statement" page on kernel.org [1], I noticed the name list was split after "J. Bruce Fields" with some extra line spacing.
The rendered html source shows that the J. is interpreted as list item in ReST syntax.
I propose a patch to remove this rendering issue with an escape string before to still allow doing git grep for the name.
I still adds rst only clutters the text though.
I checked the rendered HTML and PDF for both the English and translated versions to verify it was fixed.
On my local runs the HTML had extra <p> tags compared to the webpage so not sure what was different in the environment.
I found other pages having the same type of issues by grepping the output for "upperalpha" and checking the inappropriate occurrences.
If it is a class of fixes that is wanted, I could propose other patchsets with a batch of them.
It may be a good thing to then add the information to a general how to write documentation document to try preventing it from reappearing.
I would wait for feedback before doing these.
Please keep me in CC as I am not registered on the list.
1: https://www.kernel.org/doc/html/v5.8/process/kernel-driver-statement.html
Best Regards,
Gaëtan Harter
Gaëtan Harter (1):
docs: fix kernel-driver-statement rendering
Documentation/process/kernel-driver-statement.rst | 2 +- .../translations/it_IT/process/kernel-driver-statement.rst | 2 +- .../translations/zh_CN/process/kernel-driver-statement.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
base-commit: 9f35cf8bd7e3347b0679c3f9b5e0bc5493925a1f
Signature · 1 line
2.28.0
PATCH 1/1 docs: fix kernel-driver-statement rendering
Remove the extra newline and indentation after J. Bruce Fields in the rendered html, and extra indentation in the rendered pdf.
The J. sequence was interpreted by sphinx as a letter ordered list starting at letter J. It produced a sub ordered list as item of the main item list.
<li><ol class="first upperalpha" start="10">
<li>Bruce Fields</li>
</ol>
</li>The escaping is done before the name and not between the J and . to keep the name writing intact.
--- Documentation/process/kernel-driver-statement.rst | 2 +- .../translations/it_IT/process/kernel-driver-statement.rst | 2 +- .../translations/zh_CN/process/kernel-driver-statement.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Documentation/process/kernel-driver-statement.rst +1 -1
@@ -67,7 +67,7 @@ today, have in the past, or will in the future. - Pekka Enberg - Jan Engelhardt - Mark Fasheh - - J. Bruce Fields + - \ J. Bruce Fields - Larry Finger - Jeremy Fitzhardinge - Mike Frysinger
Documentation/translations/it_IT/process/kernel-driver-statement.rst +1 -1
@@ -75,7 +75,7 @@ futuro. - Pekka Enberg - Jan Engelhardt - Mark Fasheh - - J. Bruce Fields + - \ J. Bruce Fields - Larry Finger - Jeremy Fitzhardinge - Mike Frysinger
Documentation/translations/zh_CN/process/kernel-driver-statement.rst +1 -1
@@ -64,7 +64,7 @@ - Pekka Enberg - Jan Engelhardt - Mark Fasheh - - J. Bruce Fields + - \ J. Bruce Fields - Larry Finger - Jeremy Fitzhardinge - Mike Frysinger
Signature · 1 line
2.28.0
Jonathan Corbet
maintainerQuoted 27 lines · On Mon, 5 Oct 2020 15:02:13 +0200 Gaëtan Harter <[email protected]> wrote:
Remove the extra newline and indentation after
J. Bruce Fieldsin the rendered html, and extra indentation in the rendered pdf.The
J.sequence was interpreted by sphinx as a letter ordered list starting at letterJ. It produced a sub ordered list as item of the main item list.<li><ol class="first upperalpha" start="10"> <li>Bruce Fields</li> </ol> </li>The escaping is done before the name and not between the
Jand.to keep the name writing intact.Signed-off-by Gaëtan Harter <[email protected]>--- Documentation/process/kernel-driver-statement.rst | 2 +- .../translations/it_IT/process/kernel-driver-statement.rst | 2 +- .../translations/zh_CN/process/kernel-driver-statement.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)Documentation/process/kernel-driver-statement.rst +0
-0
Documentation/process/kernel-driver-statement.rst today, have in the past, or will in the future. · line 71
Quoted 6 lines
Documentation/process/kernel-driver-statement.rst +1
-1@@ -67,7 +67,7 @@ today, have in the past, or will in the future. - Pekka Enberg - Jan Engelhardt - Mark Fasheh - - J. Bruce Fields + - \ J. Bruce Fields - Larry Finger
Thanks for figuring this out and explaining it so well. This is a sad ambiguity in the RST syntax, I guess.
In this case, though, I'm not convinced that the cure isn't worse than the disease. We've traded a blank line in the HTML output for some ugly markup in the original text; I'm not sure we want to do that.
For this particular file, perhaps the best solution is just to put the list of signatures into a literal block. The fix for other occurrences may be different.
Thanks,
jon
Federico Vaga
maintainerWithout implementing any hack, can't we put the full name? Or just remove "J." :)
Quoted 54 lines · Jonathan Corbet
Quoted 30 lines · On Mon, 5 Oct 2020 15:02:13 +0200 Gaëtan Harter <[email protected]> wrote:
Remove the extra newline and indentation after
J. Bruce Fieldsin the rendered html, and extra indentation in the rendered pdf.The
J.sequence was interpreted by sphinx as a letter ordered list starting at letterJ. It produced a sub ordered list as item of the main item list.<li><ol class="first upperalpha" start="10"> <li>Bruce Fields</li> </ol> </li>The escaping is done before the name and not between the
Jand.to keep the name writing intact.Signed-off-by Gaëtan Harter <[email protected]>--- Documentation/process/kernel-driver-statement.rst | 2 +- .../translations/it_IT/process/kernel-driver-statement.rst | 2 +- .../translations/zh_CN/process/kernel-driver-statement.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)Documentation/process/kernel-driver-statement.rst +0
-0Documentation/process/kernel-driver-statement.rst today, have in the past, or will in the future. · line 71
Quoted 6 lines
Documentation/process/kernel-driver-statement.rst +1
-1@@ -67,7 +67,7 @@ today, have in the past, or will in the future. - Pekka Enberg - Jan Engelhardt - Mark Fasheh - - J. Bruce Fields + - \ J. Bruce Fields - Larry FingerThanks for figuring this out and explaining it so well. This is a sad ambiguity in the RST syntax, I guess.
In this case, though, I'm not convinced that the cure isn't worse than the disease. We've traded a blank line in the HTML output for some ugly markup in the original text; I'm not sure we want to do that.
For this particular file, perhaps the best solution is just to put the list of signatures into a literal block. The fix for other occurrences may be different.
Thanks,
jon
Signature · 2 lines
Federico Vaga http://www.federicovaga.it/
Quoted 1 line · Federico Vaga
Without implementing any hack, can't we put the full name? Or just remove "J." :)
I would not dare myself to change the names just as an outsider. If there is a positive feedback for this one, I could de the change. I currently only identified 5 other places where this currently applies [1] so would be a reasonable task to do.
Quoted 42 lines · Jonathan Corbet
Quoted 40 lines
Quoted 27 lines · On Mon, 5 Oct 2020 15:02:13 +0200 Gaëtan Harter <[email protected]> wrote:
Remove the extra newline and indentation after
J. Bruce Fieldsin the rendered html, and extra indentation in the rendered pdf.The
J.sequence was interpreted by sphinx as a letter ordered list starting at letterJ. It produced a sub ordered list as item of the main item list.<li><ol class="first upperalpha" start="10">
<li>Bruce Fields</li>
</ol>
</li>The escaping is done before the name and not between the
Jand.to keep the name writing intact.Signed-off-by Gaëtan Harter <[email protected]>---
Documentation/process/kernel-driver-statement.rst | 2 +- .../translations/it_IT/process/kernel-driver-statement.rst | 2 +- .../translations/zh_CN/process/kernel-driver-statement.rst | 2 +-3 files changed, 3 insertions(+), 3 deletions(-)Documentation/process/kernel-driver-statement.rst +0
-0@@ -67,7 +67,7 @@ today, have in the past, or will in the future.Quoted 6 lines
- Pekka Enberg
- Jan Engelhardt
- Mark Fasheh
- - J. Bruce Fields
+ - \ J. Bruce Fields
- Larry FingerThanks for figuring this out and explaining it so well. This is a sad ambiguity in the RST syntax, I guess.
Quoted 3 lines
Quoted 3 lines
In this case, though, I'm not convinced that the cure isn't worse than the disease. We've traded a blank line in the HTML output for some ugly markup in the original text; I'm not sure we want to do that.
As mentioned in my email I also had doubts about it.
I checked and saw the escape character used in some other files, for example Documentation/cdrom/cdrom-standard.rst where it was in the middle of the text. Being somehow a political decision what was more important between the source and the rendered output. So thought it was worth proposing at least.
For this one it seemed not too too bad being in front only, but for ones with several parts it is quite ugly like in userspace-api/media/dvb/dvbapi.rst see [1]. Unfortunately there is no "verbatim" mode that is not displayed as code.
Quoted 5 lines
Quoted 5 lines
For this particular file, perhaps the best solution is just to put the list of signatures into a literal block. The fix for other occurrences may be different.
I did an analysis of the other upperalpha occurrences [2].
I excluded the ones that are of different types. I can propose separate patches for them.
This would currently leave only the following 5 cases with the same reason due to name shortening. As it checks the html, it only finds the documents converted to rst I think.
I did use the same fix to make them visible.
Most of them would not work with a literal block I think as being as would constrain more things.
Putting the full name as suggested by Federico could solve them. Would you agree with this kind of solution?
Best Regards,
Gaëtan
1:
Documentation/PCI/pcieaer-howto.rst +1 -1
@@ -5,7 +5,7 @@ The PCI Express Advanced Error Reporting Driver Guide HOWTO =========================================================== -:Authors: - T. Long Nguyen <[email protected]> +:Authors: - \ T. Long Nguyen <[email protected]> - Yanmin Zhang <[email protected]> :Copyright: |copy| 2006 Intel Corporation
Documentation/ia64/efirtc.rst +1 -1
@@ -2,7 +2,7 @@ EFI Real Time Clock driver ========================== -S. Eranian <[email protected]> +\ S. Eranian <[email protected]> March 2000
Documentation/scsi/scsi-changer.rst +1 -1
@@ -167,7 +167,7 @@ method. With (more or less) help from: - Daniel Moehwald <[email protected]> - Dane Jasper <[email protected]> - - R. Scott Bailey <[email protected]> + - \ R. Scott Bailey <[email protected]> - Jonathan Corbet <[email protected]> Special thanks go to
Documentation/userspace-api/media/dvb/dvbapi.rst +2 -2
@@ -61,11 +61,11 @@ Revision and Copyright Authors: -- J. K. Metzler, Ralph <[email protected]> +- \ J.\ K. Metzler, Ralph <[email protected]> - Original author of the Digital TV API documentation. -- O. C. Metzler, Marcus <[email protected]> +- \ O.\ C. Metzler, Marcus <[email protected]> - Original author of the Digital TV API documentation.
Documentation/userspace-api/media/v4l/biblio.rst +1 -1
@@ -413,4 +413,4 @@ VP8 :title: RFC 6386: "VP8 Data Format and Decoding Guide" -:author: J. Bankoski et al. +:author: \ J. Bankoski et al.
2:
grep --color=auto -Inr \
-C 1 \
-e "upperalpha" \
--exclude-dir=_static \
\
$(: This ones should be fixed, they must be titles) \
--exclude=fbcon.html \
\
$(: Copyright symbol \(C\), replace by |copy|) \
--exclude=basic-pm-debugging.html \
--exclude=c2port.html \
--exclude=charger-manager.html \
--exclude=drivers-testing.html \
--exclude=freezing-of-tasks.html \
--exclude=opp.html \
--exclude=overview.html \
--exclude=runtime_pm.html \
--exclude=suspend-and-cpuhotplug.html \
--exclude=swsusp-and-swap-files.html \
--exclude=tlan.html \
--exclude=userland-swsusp.html \
\
$(: Should be interpreted as list items but not all are) \
--exclude=3270.html \
--exclude=rpc-server-gss.html \
\
$(: Q/A may not be a list item? or could just stay anyway) \
--exclude=stat.html \
\
$(: These seems to be legitimate uses) \
--exclude=acpi-lid.html \
--exclude=arcmsr_spec.html \
--exclude=bcache.html \
--exclude=dpio-driver.html \
--exclude=drm-kms-helpers.html \
--exclude=dscr.html \
--exclude=fuse.html \
--exclude=linuxized-acpica.htm \
--exclude=linuxized-acpica.html \
--exclude=memory-hotplug.html \
--exclude=mmu_notifier.html \
--exclude=resctrl_ui.html \
--exclude=sentelic.html \
--exclude=sharedsubtree.html \
\
Documentation/output/Quoted 4 lines
Quoted 3 lines
Thanks,
jon