<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lee</title>
    <description>The latest articles on DEV Community by Lee (@yugenelee).</description>
    <link>https://dev.to/yugenelee</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4139179%2F1999ac6a-10fb-4e28-b467-91b96382a4bb.jpg</url>
      <title>DEV Community: Lee</title>
      <link>https://dev.to/yugenelee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yugenelee"/>
    <language>en</language>
    <item>
      <title>The Markdown File Changed Even Though I Only Edited One Word</title>
      <dc:creator>Lee</dc:creator>
      <pubDate>Wed, 23 Sep 2026 10:03:16 +0000</pubDate>
      <link>https://dev.to/yugenelee/the-markdown-file-changed-even-though-i-only-edited-one-word-1ca2</link>
      <guid>https://dev.to/yugenelee/the-markdown-file-changed-even-though-i-only-edited-one-word-1ca2</guid>
      <description>&lt;p&gt;I once opened a Markdown file, changed one word and saved it.&lt;/p&gt;

&lt;p&gt;The preview looked exactly as expected. Then I checked the Git diff and found changes all over the document.&lt;/p&gt;

&lt;p&gt;Paragraphs had been rewrapped. Blank lines had appeared between list items. A few characters had been escaped. My one-word edit was still there, but it was buried inside a much larger rewrite.&lt;/p&gt;

&lt;p&gt;The editor had not simply changed the text I touched. It had parsed the whole document, converted it into an internal format, then generated new Markdown when I saved.&lt;/p&gt;

&lt;p&gt;That process is called a round trip, and it can be surprisingly lossy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The preview does not tell the whole story
&lt;/h2&gt;

&lt;p&gt;These two Markdown paragraphs usually render the same way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;This paragraph is wrapped manually
at a comfortable source width.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;This paragraph is written on one long line.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After parsing them, an editor may only know that each one is a paragraph. It may not remember how the original source was wrapped.&lt;/p&gt;

&lt;p&gt;When the file is saved again, the editor has to decide what Markdown to produce. It might join the lines, rewrap them at a different width or preserve every newline as a visible break.&lt;/p&gt;

&lt;p&gt;This gets more important when a line ends with two spaces or a backslash. Those can create an intentional hard break. Trimming what looks like unnecessary whitespace may change how the document renders. I ended up documenting the difference between &lt;a href="https://markdific.com/docs/markdown/line-breaks/" rel="noopener noreferrer"&gt;soft and hard Markdown line breaks&lt;/a&gt; because it is an easy detail to miss.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lists have the same problem
&lt;/h2&gt;

&lt;p&gt;This is a tight list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; Alpha
&lt;span class="p"&gt;-&lt;/span&gt; Beta
&lt;span class="p"&gt;-&lt;/span&gt; Gamma
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a loose list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; Alpha
&lt;span class="p"&gt;
-&lt;/span&gt; Beta
&lt;span class="p"&gt;
-&lt;/span&gt; Gamma
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They may look almost identical under some themes, but their Markdown structure is different. If an editor always saves lists in its preferred style, a tiny edit can produce a very noisy diff.&lt;/p&gt;

&lt;p&gt;The same thing happens with indentation in nested lists, aligned table columns and reference-style links. The document may still render correctly, but the source is no longer the source you opened.&lt;/p&gt;

&lt;h2&gt;
  
  
  App-specific Markdown makes it harder
&lt;/h2&gt;

&lt;p&gt;Real Markdown files often contain syntax that is not part of standard Markdown:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;[[Project Roadmap]]
&lt;span class="gh"&gt;#release&lt;/span&gt;
&lt;span class="gt"&gt;&amp;gt; [!NOTE]&lt;/span&gt;
&lt;span class="gt"&gt;&amp;gt; This ships on Friday.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One app may understand those as a wiki-link, a tag and a callout. Another editor may see ordinary punctuation and escape it when saving.&lt;/p&gt;

&lt;p&gt;That is why “supports Markdown” can mean very different things. CommonMark, GitHub Flavored Markdown, Pandoc and apps such as Obsidian do not all understand the same syntax.&lt;/p&gt;

&lt;p&gt;If an editor does not recognise something, leaving it untouched is often safer than trying to correct it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple test
&lt;/h2&gt;

&lt;p&gt;There is an easy way to check an editor before trusting it with important files:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copy a representative &lt;code&gt;.md&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Open it and change one ordinary word.&lt;/li&gt;
&lt;li&gt;Save and close it.&lt;/li&gt;
&lt;li&gt;Compare the saved file with the original.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The diff should show the word you changed and nothing unrelated.&lt;/p&gt;

&lt;p&gt;Try the same test without editing anything. Just open and save the file. Ideally, it should remain identical.&lt;/p&gt;

&lt;p&gt;Use a real document containing the things you normally write, such as nested lists, tables, code blocks, maths, images, front matter or wiki-links. A perfect five-line README will not expose much.&lt;/p&gt;

&lt;p&gt;Opinionated formatting is not always bad. A team may deliberately choose one Markdown style and format every file consistently. The important thing is that the behaviour is clear and expected.&lt;/p&gt;

&lt;p&gt;But if the editor promises to work with existing Markdown files, the source matters as much as the preview.&lt;/p&gt;

&lt;p&gt;Change one word, save the file, and check what else changed.&lt;/p&gt;

</description>
      <category>markdown</category>
      <category>documentation</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
