-
Notifications
You must be signed in to change notification settings - Fork 67
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
Too many empty lines around code
#47
Comments
I'm attaching a screenshot that demonstrates the problem better. It's divided in 4 parts:
As you can see, the tops ones only have one empty line and are pretty, go-md2man with mandoc has 3 empty lines, and ronn man with mandoc has 2 empty lines. |
Looking a few things today, I see where we are producing some extra paragraph tags for section headers. Wonder if that's the problem here. Anyway, if you can provide some source material I can check. |
Hello, due to this issue we switched our build scripts to prefer Source: https://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp/view/head:/server/man/lts.conf.5.md Thank you very much for your work in this! |
I tested go-md2man 2.0.0+ds-5 from Ubuntu 22.04, along with the gnome "yelp" program as a quick alternative to mandoc. The following input: ```shell
a shell command
``` produced the following output:
With that output, yelp displays one extra line. If I manually remove the blank line before Btw, I still need to run Thank you! |
This is off-topic for the issue at hand, and yet:
Since PR #95, this has changed to
Meaning, there is still an extra newline. |
I think this should fix it: #113 |
For the LTSP5 package, we switched our manpage sources from .xml to .md and we started using go-md2man. After Debian Buster was released and its man pages went online, we noticed a problem.
The man pages generated by
go-md2man
display fine when viewed underman
. But when distributions use mandoc to publish them as .html pages online, a lot of empty lines are included in the html output, around the markdowncode
blocks (and I think elsewhere too).As an example, see our lts.conf man page, as produced by go-md2man and then published by Debian's mandoc:
https://manpages.debian.org/unstable/ltsp-server/lts.conf.5.en.html
Search for the following line, and see how many empty lines are around it:
FSTAB_1="server:/home /home nfs defaults,nolock 0 0"
Our previous lts.conf manpage, that wasn't using go-md2man, displays a lot less empty lines:
https://manpages.debian.org/unstable/ltsp-docs/lts.conf.5.en.html
Ronn
also manages to convert our new markdown-based man pages without extra empty lines, so I believe it's an issue with go-md2man. Thanks!The text was updated successfully, but these errors were encountered: