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: https://gaelicwizard.me/replies/2022/05/05/12830514.html exports as

---
layout: post
microblog: true
date: 2022-05-05T20:49:55-0700
type: reply
url: /replies/2022/05/05/12830418.html
reply_to_url: https://gaelicwizard.me/2022/05/05/204331.html
reply_to_hostname: gaelicwizard.me
reply_to_username: gaelicWizard
reply_to_avatar: https://www.gravatar.com/avatar/188b013d697637b744f87059d019ad4f?s=96&d=https%3A%2F%2Fmicro.blog%2Fimages%2Fblank_avatar.png
---
<p><a href="https://micro.blog/gaelicWizard">@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
guid: http://gaelicWizard.micro.blog/2022/05/05/204331.html
date: 2022-05-05T20:43:31-0700
type: post
url: /2022/05/05/204331.html
---
In reply to <a href="https://micro.blog/account/posts/67465/preview/1563563" class="u-in-reply-to">micro.blog/account/p...</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 Micro.blog 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 Micro.blog 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 Micro.blog 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 Micro.blog set to show replies on your blog, it’s processed by Hugo again.