I’m trying to import by old blog to Micro.blog using the Markdown import and noticed a problem with rendering.
Here is a small version of a Markdown file that shows the problem:
---
title: "test output tracking import"
url: /writing/output-tracking-vs-mocks/
date: 2024-07-26
---
<p>In this blog post we’re going ...</p>
<h2 id="example-git-client">Example Git client</h2>
<p>The application implements two commands:</p>
<pre><code>myscm save -> git commit
myscm share -> git push</code></pre>
The import modifies the pre-block: test output tracking import | Rickard Lindberg
<article class="post-content e-content">
<p>In this blog post we’re going ...</p>
<h2 id="example-git-client">Example Git client</h2>
<p>The application implements two commands:</p>
<pre><code>myscm save -> git commit
<p>myscm share -> git push</code></pre></p>
</article>
I would assume that it copy it verbatim.
However, if I paste the exact same file (except the front matter) in the post-box and hit preview, I get the correct result.
However, when I hist post, it renders wrong again: In this blog post we’re … | Rickard Lindberg
To me, it seems like the Markdown processor doesn’t respect thew newline in the pre-block and tries to make to separate paragraphs of it. But why doesn’t it happen in the preview?
Any suggestions as to how I can get my import to render the same would be helpful. Thanks!