Replies posting with in pre-rendered HTML instead of markdown

I replied to a post on M.B and the export shows that the post was rendered in HTML by M.B and not by Hugo: exports as

layout: post
microblog: true
date: 2022-05-05T20:49:55-0700
type: reply
url: /replies/2022/05/05/12830418.html
reply_to_username: gaelicWizard
<p><a href="">@gaelicWizard</a> wut</p>

I understand inserting the link at the front in HTML (but I don’t understand why it doesn’t have in-reply-to and a proper URL), but wrapping the whole thing in <p>/</p> is weird.

Alsö, posting a reply via the Micropub endpoint with a valid M.B URL maps the whole post to this format, changing the post content and adding what I did not type. But, posting with a valid in-reply-to that is not a M.B post gives an even weirder export to Hugo:

layout: post
microblog: true
date: 2022-05-05T20:43:31-0700
type: post
url: /2022/05/05/204331.html
In reply to <a href="" class="u-in-reply-to"></a>

Goodnight Moon

This one has no front matter referring to the reply, and doesn’t show up under Replies on my blog or on M.B, and adds an ugly paragraph (without <p>/</p>) to the top of my post.

Some of these inconsistencies are because of how stores replies (when they start with an @-username) differently than regular posts. Replies do not contain full HTML so they are run through the Markdown processor which is adding the <p> tags.

As for adding u-in-reply-to… That’s a good question. I’m not sure why we aren’t doing that automatically. Probably because those replies are usually internal to so nothing else was consuming the HTML, but it seems like something we should add.

Hugo runs it through Markdown already; why does it need to be done twice?

Because replying on does not require a blog, so there might not be any Hugo to run it through. If someone replies, we convert it to HTML right away and add it to the timeline. Then if you have set to show replies on your blog, it’s processed by Hugo again.