Break Points After a Slash or a Hyphen

Break only at spaces and a file path becomes one very long word. So does a hyphenated compound, and so does a part reference full of slashes — and those are exactly what a technical document is made of. A column that is comfortable for prose is far too narrow for them, and widening it to suit the worst one ruins the page for everything else.

The break keeps the character on the line it belongs to: the slash stays at the end of the upper line rather than opening the lower one. No hyphen is invented anywhere, so nothing is added to the text that was not written in it.

The third setting names no character at all: the punctuation itself says where a word may break. A slash or a hyphen inside a word lets it break, while the slash that opens a path stays with the name it opens, and a fraction or a bracket is never split from what it holds.

The fourth setting breaks where the punctuation allows too, but each compound is written with a no-break hyphen: the paths still wrap, while a compound such as rate-limited stays whole on its line.

What This Example Shows

  • Break points allowed after a slash and after a hyphen.
  • The breaking character kept at the end of the line it ends.
  • Long paths wrapped without inventing a hyphen.
  • Breaks read off the punctuation, with no character to name.
  • A no-break hyphen keeping a compound on one line.

The Source Code, Complete

Nothing is left out and nothing is simplified: this is the program exactly as it runs, for the developer who uses this library. The third is the description itself: a plain list of what the page has to say, which is what the service is sent.

Read the Rust source Read the Python source Read the JSON source

The Document Itself

Open the document in English Open the document in French Open the document in German Open the document in Spanish Open the document in Italian Open the document in Portuguese

Break Points After a Slash or a Hyphen, first page

The Same Document in Other Languages

This document weighs 12.9 kB

Examples Near This One

Breaking an Overlong Word

A word longer than the column that holds it: the library leaves it whole, cuts it at the column's edge, or cuts it and closes the line on a hyphen.

A Stack Laid out by Hand, One Box at a Time

A delivery slip poured into two boxes, the second taking up where the first stopped, and a poster whose picture no box can hold, each box saying what became of the stack in it.

A Font behind the Font

One line of statuses set twice: in a company font alone, where the characters it has no glyph for come out as empty boxes, then with a second font behind it that draws them.

Every example, by subject