Skip to main content

Module language

Module language 

Source
Expand description

A path’s language, its Linguist colour, and its comment syntax for the line counter. The syntax registry owns the extension table for every language it highlights; this module adds the ones it only counts.

Structs§

Language

Functions§

count_lines
(code, comments, blanks). A line counts as a comment only when it opens with one, as scc and cloc count.
of_path
readable_on
Push color away from bg until it reaches 3:1 contrast. Linguist tunes its palette for a white page, so JSON’s #292929 vanishes on a dark one.

Type Aliases§

Rgb