Pandoc 2.8 introduces an unwanted line break for existing code.
Input comes from cweb.md, which is converted to man output with the command line in cwebbin.spec, i.e., pandoc --standalone --from markdown+all_symbols_escapable --to man cweb.md --output cweb.1.
Expected output is a _single_ line
.TH "CWEB" "1" "June 20, 2019" "Web2c \[at]VERSION\[at]" "General Commands Manual"
Actual output is a line break _inside_ the quoted date string
.TH "CWEB" "1" "June 20,
2019" "Web2c \[at]VERSION\[at]" "General Commands Manual"
although there's plenty of opportunity to break _between_ two quoted strings (or not break at all in this instance).
This is related to the template changes in 2.8.
We need to fix it by making sure the date and title values are transformed by nowrap before being passed to the template.
Note: the break won't occur between the two quoted strings unless a special indication is put in the template to allow template spaces to break. But here I don't think you want any breaks at all, or .TH won't work properly.
Indeed, the final man ./cweb.1 shows the date as June 20, _without_ the year 2019.
One way we might solve this would be adding a nowrap filter to doctemplates. Then the man template could be changed, so that variables are included as $date/nowrap$ etc.
When i tried this I got a break in a more reasonable place:
.TH "cwbe" "1" "June 20, 2019" "Web2c \[at]VERSION\[at]" "General
commands manual"
Is it possible you're using nonbreaking spaces in the header or footer?
I can confirm that using the dev version of doctemplates (8b10ee1e2f0f792016c3aebe208744eba6baf73f) and a new template that adds /nowrap to these variables fixes the issue.
Header and footer of the cweb.1 manpage are created by Pandoc from the input
% CWEB(1) Web2c @VERSION@ | General Commands Manual
%
% June 20, 2019
# NAME
ctangle, cweave -- translate CWEB to C/C++ and/or TeX
...
Especially the date line has only plain spaces.
Pandoc 2.7.3 creates (head cweb.1)
.\" Automatically generated by Pandoc 2.7.3
.\"
.TH "CWEB" "1" "June 20, 2019" "CWEBbin 2019" "General Commands Manual"
.hy
.SH NAME
.PP
ctangle, cweave \[en] translate CWEB to C/C++ and/or TeX
...
Pandoc 2.8 creates
.\" Automatically generated by Pandoc 2.8
.\"
.TH "CWEB" "1" "June 20,
2019" "CWEBbin 2019" "General Commands Manual"
.hy
.SH NAME
.PP
ctangle, cweave \[en] translate CWEB to C/C++ and/or TeX
...
This is fixed in master; I'll put out a new release in the next couple weeks, probably.
2.8.0.1 now released with this fix