Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 2.11 KB

max-width.md

File metadata and controls

53 lines (36 loc) · 2.11 KB

Max Width

The Max Width setting is used to control the maximum characters per line of a snippet. If any snippet has a line that exceeds the maximum an error will be thrown.

Usage

Config File

{
  "MaxWidth": 80
}

Command Line

--max-width 80

Code Api

var processor = new DirectoryMarkdownProcessor(
    "targetDirectory",
    maxWidth: 80,
    directoryIncludes: _ => true,
    markdownDirectoryIncludes: _ => true,
    snippetDirectoryIncludes: _ => true);
processor.Run();

snippet source | anchor

References

https://en.wikipedia.org/wiki/Line_length#Electronic_text

Legibility research specific to digital text has shown that, like with printed text, line length can affect reading speed. If lines are too long it is difficult for the reader to quickly return to the start of the next line (saccade) whereas if lines are too short more scrolling or paging will be required. Researchers have suggested that longer lines are better for quick scanning, while shorter lines are better for accuracy. Longer lines would then be better suited for cases when the information will likely be scanned, while shorter lines would be appropriate when the information is meant to be read thoroughly. One proposal advanced that, in order for on-screen text to have the best compromise between reading speed and comprehension, about 55 cpl should be used. On the other hand, there have been studies indicating that digital text at 100 cpl can be read faster than text with lines of 25 characters, while retaining the same level of comprehension.