1
0
forked from GitHub/gf-core

strip empty phrases in bracketedLinearize

This commit is contained in:
krangelov
2019-02-27 08:27:50 +01:00
parent fc37bc26cd
commit 52f2739da1

View File

@@ -990,11 +990,13 @@ withBracketLinFuncs ref exn f =
end_phrase ref _ c_cat c_fid c_lindex c_fun = do end_phrase ref _ c_cat c_fid c_lindex c_fun = do
(bs':stack,bs) <- readIORef ref (bs':stack,bs) <- readIORef ref
cat <- peekUtf8CString c_cat if null bs
let fid = fromIntegral c_fid then writeIORef ref (stack, bs')
let lindex = fromIntegral c_lindex else do cat <- peekUtf8CString c_cat
fun <- peekUtf8CString c_fun let fid = fromIntegral c_fid
writeIORef ref (stack, Bracket cat fid lindex fun (reverse bs) : bs') let lindex = fromIntegral c_lindex
fun <- peekUtf8CString c_fun
writeIORef ref (stack, Bracket cat fid lindex fun (reverse bs) : bs')
symbol_ne exn _ = do symbol_ne exn _ = do
gu_exn_raise exn gu_exn_type_PgfLinNonExist gu_exn_raise exn gu_exn_type_PgfLinNonExist