Skip to content

Commit

Permalink
docs(Tty): update documentation on Unicode line breaking (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
favonia authored Oct 31, 2024
1 parent 2a21ab4 commit 4024850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tty/Tty.mli
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module Make (Message : Minimum_signatures.Message) : sig
@param use_ansi Whether to use ANSI escape sequences, overriding auto-detection. ANSI escape sequences are used for coloring and styling the output. By default, auto-detection checks if the [output] is a TTY and if the environment variable [TERM] is set to a non-empty value other than [dumb].
@param use_color Whether to use colors when ANSI escape sequences are used, overriding auto-detection. By default, auto-detection will disable colors if ANSI escape sequences are not used or if the environment variable [NO_COLOR] is set to a non-empty value. Note that even when colors are disabled, the handler may still use bold, faint, and underline styles for highlighting if ANSI escape sequences are used. It is an error to explicitly set [use_color] to [true] and [use_ansi] to [false].
@param show_backtrace Whether the backtrace should be shown. The default is [true].
@param line_breaks The set of character sequences that are recognized as (hard) line breaks. The [`Unicode] set contains all Unicode character sequences in {{:https://www.unicode.org/versions/Unicode15.0.0/ch05.pdf#G41643}Unicode 15.0.0 Table 5-1.} The [`Traditional] set only contains [U+000A (LF)], [U+000D (CR)], and [U+000D U+000A (CRLF)] as line breaks. The default is the [`Traditional] set.
@param line_breaks The set of character sequences that are recognized as (hard) line breaks. The [`Traditional] set contains [U+000A (LF)], [U+000D (CR)], and [U+000D U+000A (CRLF)] as line breaks. The [`Unicode] set additionally contains [U+000B (VT)], [U+000C (FF)], [U+0085 (NEL)], [U+2028 (LS)], and [U+2029 (PS)], known as mandatory breaks in {{:https://www.unicode.org/reports/tr14}The Unicode Line Breaking Algorithm}. Your lexer or parser must recognize exactly the same set of character sequences as line breaks. The default is the [`Traditional] set that is compatible with the Language Server Protocol.
@param block_splitting_threshold The maximum number of consecutive, non-highlighted lines allowed in a block. The function will try to minimize the number of blocks, as long as no block has too many consecutive, non-highlighted lines. A higher threshold will lead to fewer blocks. When the threshold is zero, it means no block can contain any non-highlighted line. The default value is [5].
@param marker A function that displays marks as strings. It takes the final values of [use_ansi] and [use_color], the target message the mark belongs to, and whether the mark indicates the start or end of a range or the location of a point. See {!type:marker} for more details. The default value is {!val:default_marker}.
@param tab_size The number of spaces that should be used to replace a horizontal tab. Note that a horizontal tab is always expanded to the same number of spaces. The result should still be visually appealing as long as horizontal tabs are only used at the beginning of lines. The default value is [8].
Expand Down

0 comments on commit 4024850

Please sign in to comment.