Master GitHub markdown tables with multi-line code blocks

I am a Software Engineer working on open source and enterprise mobile SDKs for iOS and MacOS developers written in Swift. From ๐ฉ๐ช and happily living in ๐บ๐ธ
Search for a command to run...

I am a Software Engineer working on open source and enterprise mobile SDKs for iOS and MacOS developers written in Swift. From ๐ฉ๐ช and happily living in ๐บ๐ธ
No comments yet. Be the first to comment.
WWDC26 kicked off on June 8, 2026. The information in this article reflects the information published by Apple on that date. There are 14 new frameworks. Name Description AccessoryAccess Manage

WWDC25 kicked off on June 9, 2025. The information in this article reflects the information published by Apple on that date. New Frameworks NameDescription AlarmKitSchedule prominent alarms and countdowns to help people manage their time. AVR...

WWDC25 is almost here, and I couldnโt be more excited! Whether you're attending the official events, community meetups, or just soaking in the energy around Cupertino, thereโs no better time to connect, share ideas, and celebrate everything we love a...

In this blog post, Iโll share an observation and advice regarding the caching behavior of network responses by Appleโs APIs. If you are unfamiliar with caching of network responses then I recommend Appleโs article Accessing cached data that introduce...
WWDC24 kicked off on June 10, 2024. The information in this article reflects the information published by Apple on that date. New Frameworks NameDescription AccessorySetupKitUse AccessorySetupKit to discover accessories with Bluetooth or Wi-Fi...

Do you want to show a table with a multi-line code block on GitHub?

Then follow these golden rules
Unfortunately, a markdown table is not suitable to contain code blocks.
Some markdown editors might show correct layout and syntax highlighting if you use HTML br elements in your code block. But this is very cumbersome and awkward. And finally, GitHub itself will show the code block on a single line :(
Use a HTML table instead!
Use either backticks (```) or the HTML pre element with attribute lang to enclose your code blocks.
Do NOT use HTML code element as you won't get syntax highlighting.
Keep a blank line before and after a code block for correct formatting and syntax highlighting. Otherwise, your code may show up as a single line and unformatted.
Some of the popular online editors will not accurately preview such a table.
Good ๐: Markdown Editor, HackMD and HedgeDoc

Bad ๐: StackEdit and Dillinger

Use TablesGenerator to easily generate either HTML or markdown tables.

Use the following gist as a reference (view raw) and for testing in the markdown editor of your choice