mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
755 stars 138 forks source link

compatibility: initial tab replaced by four spaces #247

Open step- opened 4 months ago

step- commented 4 months ago

Opportunity to improve output compatibility: md2html replaces an initial TAB with four spaces while cmark doesn't.

test subject:

<!--
    x
-->
    z

expected output (cmark output)

<!--
    x
-->
<pre><code>&lt;!--
    y
--&gt;
</code></pre>
<pre><code>z
</code></pre>

actual output: (md2html output)

<!--
    x
-->
<pre><code>&lt;!--
    y
--&gt;
</code></pre>
<pre><code>z
</code></pre>

Versions tested:

mity commented 4 months ago

Sorry, this report is so badly formatted, I'm unable to parse what you really mean. Can you edit it to make it clear? (Ideally one code block for input, one code block for actual output, one code block for expected output.)

step- commented 4 months ago

Sure, I just edited the report. I hope it's more clear now. I used github cli to upload the original comment, I'm not sure what went wrong. Anyway, the difference between expected and actual output is in the white space before x and y: one tab for expected (cmark), and four spaces for actual (md2html).

edit: fixed report