[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Similar to spaces, allow breaking after non-text nodes (b7672cc)

Marcel Fabian Krüger tex at 2krueger.de
Fri Jul 2 02:03:00 CEST 2021


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/b7672cce61dc7cd4d7f8227d155c3c994e63165d

>---------------------------------------------------------------

commit b7672cce61dc7cd4d7f8227d155c3c994e63165d
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Fri Jul 2 02:03:00 2021 +0200

    Similar to spaces, allow breaking after non-text nodes


>---------------------------------------------------------------

b7672cce61dc7cd4d7f8227d155c3c994e63165d
 src/luaotfload-harf-plug.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/luaotfload-harf-plug.lua b/src/luaotfload-harf-plug.lua
index 5d76a69..9d2409b 100644
--- a/src/luaotfload-harf-plug.lua
+++ b/src/luaotfload-harf-plug.lua
@@ -430,7 +430,9 @@ function shape(head, firstnode, run)
       end
 
         -- Is this a safe breakpoint?
-      if discs and ((not glyph) or codes[cluster] == 0x20 or codes[cluster+1] == 0x20 or codes[cluster+1] == 0xFFFC
+      if discs and ((not glyph)
+            or codes[cluster] == 0x20 or codes[cluster+1] == 0x20
+            or codes[cluster] == 0xFFFC or codes[cluster+1] == 0xFFFC
           or not unsafetobreak(glyph)) then
         -- Should we change the discretionary state?
         local anchor_cluster, after_cluster = offset + discs.anchor_cluster, offset + discs.after_cluster





More information about the latex3-commits mailing list.