From 408ba6d654e1185c53bcb3c6c45225583a9bd150 Mon Sep 17 00:00:00 2001 From: Joshua Reusch Date: Fri, 1 Nov 2024 13:53:51 +0100 Subject: [PATCH] limit no longer breaks words on non-breaking spaces --- src/string_width.gleam | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/string_width.gleam b/src/string_width.gleam index 2ec3c44..28d6163 100644 --- a/src/string_width.gleam +++ b/src/string_width.gleam @@ -684,9 +684,8 @@ pub fn limit_with( commit(max_col, state, piece, width) } - // White_Space=Y + // White_Space=Y, excluding control characters and non-breaking spaces " " - | "\u{a0}" | "\u{1680}" | "\u{2000}" | "\u{2001}" @@ -695,11 +694,9 @@ pub fn limit_with( | "\u{2004}" | "\u{2005}" | "\u{2006}" - | "\u{2007}" | "\u{2008}" | "\u{2009}" | "\u{200a}" - | "\u{202f}" | "\u{205f}" | "\u{3000}" -> commit(max_col, state, piece, width) -- 2.51.2