From 5a8f08ff1dccc0e56f41fc65dbe47e6e5b729038 Mon Sep 17 00:00:00 2001 From: favonia Date: Thu, 31 Oct 2024 08:33:06 -0500 Subject: [PATCH] docs(Tty): update documentation on Unicode line breaking --- src/tty/Tty.mli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty/Tty.mli b/src/tty/Tty.mli index 04eeaa4..71b3afe 100644 --- a/src/tty/Tty.mli +++ b/src/tty/Tty.mli @@ -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].