Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> But not for most markdown files, at least how I use it. I only start new line when I reach a new paragraph, and I think this is normal for most people who ever write something in markdown.

Markdown treats lines separated with a single line break as a continuous line/the same paragraph, and you need to add two or more newlines for Markdown to interpret it as a new paragraph.

Git works just fine with Markdown.



This is true.

But how does someone take advantage of it without changing their current behavior: write an entire paragraph and do 2 line breaks.

Always end a sentence with '.\n'? Manually format lines so no line have more than 80 characters?


There are some options here on SO: https://stackoverflow.com/questions/43122175/automatically-h...

Prettier options to extensions like Rewrap, one of those might fit your use case.


> But how does someone take advantage of it without changing their current behavior: write an entire paragraph and do 2 line breaks.

I don't understand your question. Markdown's syntax already requires 2+ newlines to define a paragraph. There should be no change in a workflow if you're already using Markdown.

The only nuance is that if you want git to track changes in each sentence that forms a paragraph, just add a single line break after the punctuation mark. Markdown still interprets that as the same text block, but git is able to handle changes per line.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: