Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 9
    Thanks! The rendering differences between our preview and server-side rendering are always subtle and annoying. I figured out that you can get both to render the table properly if you include leading and trailing pipe characters in each row.
    – Ham Vocke StaffMod
    Commented Nov 24, 2020 at 9:16
  • 4
    @HamVocke What's the general cause of differences between the client-side renderer and the server-side one? I've seen a lot of bugs crop up with differences between one and the other, especially since the CommonMark migration began. Why are the two renderers different; why not use the exact same code for rendering on both sides? Commented Nov 24, 2020 at 9:50
  • 7
    @SonictheK-DayHedgehog client-side and server-side renderer are two different pieces of code, both sticking to the CommonMark specification. As it turns out, the specification leaves room for ambiguity and both interpret the spec slightly different at times, leading to the differences we're seeing. We can't run the same code in both places, we've got to use JavaScript client-side while our backend runs on C#. We're trying to eliminate these differences as good as we can (and as is reasonable given time and impact).
    – Ham Vocke StaffMod
    Commented Nov 24, 2020 at 10:00
  • Thanks for the info @HamVocke! It makes sense that adding the outer pipes | would bound the row, and help the renderer recognize it as a table row rather than a blockquote.
    – zcoop98
    Commented Nov 24, 2020 at 16:12
  • 2
    Given that we've found a workaround that removes any ambiguity, I'll give this a status-deferred. Ideally we align both libraries here but this will take some fixes in the respective libraries directly which is more cumbersome than us fixing it directly.
    – Ham Vocke StaffMod
    Commented Nov 25, 2020 at 7:52
  • Wait, why can't we markdown within a table cell?
    – einpoklum
    Commented Dec 3, 2020 at 21:42
  • @HamVocke Worth considering running a node.js microservice maybe on the server? Or the less trivial, but far cooler alternative would be to compile markdig to webassembly using wasm or blazor. Commented Dec 7, 2020 at 7:34
  • @HamVocke Same issue with a number and a dot in the first column (e.g. 1.). Renders fine in the preview, stops the table and starts a numbered list in live post. Same workaround.
    – GSerg
    Commented Feb 24, 2021 at 19:31