Skip to content

Conversation

@jay
Copy link
Member

@jay jay commented Feb 16, 2025

  • Terminate a code section before parsing a heading line.

Prior to this change when a code line (eg code) was followed
by a heading line (eg ## heading) the code section in the output
was terminated after converting the header instead of before. That led
to some weird formatting outputs depending on the nroff or roffit etc.

With this change:

.nf
curl \--expand\-url https.//example.com/{{url:trim}}
.fi
.IP json

Without this change:

.nf
curl \--expand\-url https.//example.com/{{url:trim}}
.IP json
.fi

Closes #xxxx


There is bad formatting in the curl man page website version

bad_pre_format

I traced at least part of the problem back to managen and fixed it in managen's nroff formatted output but I'm not sure about the webpage generation so more changes may be needed after this. (update: more changes were not needed)

- Terminate a code section before parsing a heading line.

Prior to this change when a code line (eg "    code") was followed
by a heading line (eg "## heading") the code section in the output
was terminated after converting the header instead of before. That led
to some weird formatting outputs depending on the nroff or roffit etc.

With this change:

.nf
curl \--expand\-url https.//example.com/{{url:trim}}
.fi
.IP json

Without this change:

.nf
curl \--expand\-url https.//example.com/{{url:trim}}
.IP json
.fi

Closes #xxxx
@jay jay added the script label Feb 16, 2025
@jay jay closed this in 28d3c5d Feb 16, 2025
@jay jay deleted the managen_code_formatting branch February 16, 2025 23:54
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
- Terminate a code section before parsing a heading line.

Prior to this change when a code line (eg "    code") was followed
by a heading line (eg "## heading") the code section in the output
was terminated after converting the header instead of before. That led
to some weird formatting outputs depending on the nroff or roffit etc.

With this change:

.nf
curl \--expand\-url https.//example.com/{{url:trim}}
.fi
.IP json

Without this change:

.nf
curl \--expand\-url https.//example.com/{{url:trim}}
.IP json
.fi

Closes curl#16345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants