]> git.ipfire.org Git - thirdparty/curl.git/commit
scripts/managen: fix parsing of markdown code sections
authorJay Satiro <raysatiro@yahoo.com>
Sun, 16 Feb 2025 07:49:43 +0000 (02:49 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 16 Feb 2025 23:52:17 +0000 (18:52 -0500)
commit28d3c5dced240a541917b3d8a7bef2ee9cd6a48c
treecf69afc42478bb1241220d4f19d4a46457bb8950
parent760bbb21101b1fc680ab559f2820a4715229e49e
scripts/managen: fix parsing of markdown code sections

- 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 https://github.com/curl/curl/pull/16345
scripts/managen