DEV Community

Cover image for How to show diff in Markdown file

How to show diff in Markdown file

Zied Ghalleb on February 11, 2024

In software development, accurately communicating code changes is crucial for collaboration. Markdown is a lightweight markup language widely used ...
Collapse
 
johannes_k_rexx profile image
johnblommers

Thanks for posting this. I'm a daily and frequent user of Markdown and never realized this feature existed. It's a GitHub Flavored Markdown (GFM) feature. Typora supports it too. As does MindForger.

What seems to be missing is a good way to diff two Markdown files and highlight the additions and deletions by striking/underlining and colorizing in red/green right in the text, not that aweful way the normal diff displays them.

But hold! I just found Markdown-diff which works when used with marked but breaks down when entire sentences are added or removed.

The learning journey continues ...