Semantic Line Breaks

https://news.ycombinator.com/rss Hits: 8
Summary

Semantic Line Breaks Summary When writing text with a compatible markup language, add a line break after each substantial unit of thought. Introduction Semantic Line Breaks describe a set of conventions for using insensitive vertical whitespace to structure prose along semantic boundaries. Many lightweight markup languages, including Markdown, reStructuredText, and AsciiDoc, join consecutive lines with a space. Conventional markup languages like HTML and XML exhibit a similar behavior in particular contexts. This behavior allows line breaks to be used as semantic delimiters, making prose easier to author, edit, and read in source — without affecting the rendered output. To understand the benefit of semantic line breaks, consider the following paragraph from the Universal Declaration of Human Rights: All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood. Without any line breaks at all, this paragraph appears in source as a long, continuous line of text (which may be automatically wrapped at a fixed column length, depending on your editor settings): All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood. Adding a line break after each sentence makes it easier to understand the shape and structure of the source text: All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood. We can further clarify the source text by adding a line break after the clause “with reason and conscience”. This helps to distinguish between the “and” used as a coordinating conjunction between “reason and conscience” and the “and” used as a subordinating conjunction with the clause “and should act towards one another in a spirit of brotherhood”: All human bei...

First seen: 2025-09-10 08:07

Last seen: 2025-09-10 15:09