Closed not-my-profile closed 1 month ago
rst2xml
gives:
<docinfo><field classes="foo"><field_name>foo</field_name><field_body><paragraph>bar</paragraph></field_body></field></docinfo>
for your input. Note the <paragraph>
. So I think pandoc's behavior is correct here. (Note that pandoc removes the paragraph from title, author, date.)
Interesting. printf '=\nA\n=\n:foo: bar' | rst2html
gives
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr class="foo field"><th class="docinfo-name">foo:</th><td class="field-body">bar</td>
</tr>
</tbody>
</table>
Note that there is no <p>
. This issue is specifically about being able to interpolate non-standard metadata without the <p>
wrapping.
Interesting. We could easily convert all single Para metadata fields into single Plain ones. But I don't know if that's the right behavior either. Note:
% printf '=\nA\n=\n:abstract: bar' | rst2html
...snip...
<div class="abstract topic">
<p class="topic-title">Abstract</p>
<p>bar</p>
</div>
...
Explain the problem.
With RST the metadata value is wrapped in a
<p>
tag meaning variables cannot be interpolated into attribute values.(It's worth noting that docutils also does some paragraph normalization).
On a related note it would be nice if lists were preserved as well:
Pandoc version? pandoc 2.16.2 on Linux