kramdown-rfc
kramdown-rfc copied to clipboard
dl formatting
using a DL in markdown produces XML like this:
<dl>
<dt>
Name </dt>
<dd>
<t>dns_timeout</t>
</dd>
<dt>
Description </dt>
<dd>
<t>The intermediary encountered a timeout when trying to find an IP address for the next hop hostname.</t>
</dd>
<dt>
Extra Parameters </dt>
<dd>
<t>None.</t>
</dd>
<dt>
Recommended HTTP status code </dt>
<dd>
<t>504</t>
</dd>
<dt>
Response only generated by intermediaries </dt>
<dd>
<t>true</t>
</dd>
<dt>
Reference </dt>
<dd>
<t>[RFC9209]</t>
</dd>
</dl>
whereas the RPC produces XML like this:
<dl>
<dt>Name:</dt><dd> dns_timeout</dd>
<dt>Description:</dt><dd> The intermediary encountered a timeout when trying to find an IP address for the next-hop hostname.</dd>
<dt>Extra Parameters:</dt><dd> None.</dd>
<dt>Recommended HTTP status code:</dt><dd> 504</dd>
<dt>Response only generated by intermediaries:</dt><dd> true</dd>
<dt>Reference:</dt><dd> RFC 9209</dd>
</dl>
Is it possible to change the whitespace of the output to look more like the RPC's, to avoid unnecessary diffs?
It's easy to remove the spurious newline ahead of the <dt content and the spurious spaces after it. Staying on the same line for <dd only appears to make sense for newline=false style <dd. Also, kramdown-rfc will saddle you with <t around the <dd content, and that is much harder to get rid of at the moment.
And it will be hard to emulate those weird spaces after <dd>.
With 7c0f82c the output now looks peachy clean to me. Why can't the RFC editor stick with that?
That's fine, I'm sure -- part of the problem here is that often people define things as lists and the RPC converts them to DLs.
Thanks! (will this be in a release soon?)
I can push it any day, do you want it now?
that would be helpful, yes :)
Done (1.6.2).
I'm not closing this issue, because it would be nice to address the rest of the problem as well.
Thanks!
The extra space is an artefact of them converting it from a list, so don't worry about it (they kindly removed it for me).
They've also put dt and dd on separate lines for me, so the only big thing left is the spurious t, I think.