diff --git a/modules/intermediate_format/preprocessing.xqm b/modules/intermediate_format/preprocessing.xqm
index 3bfa7cf0e0d105e94e9f77ee139b905dfc01b608..f9ddaf00b9e41e2f2f9df47bd9eb737caf49fd5a 100644
--- a/modules/intermediate_format/preprocessing.xqm
+++ b/modules/intermediate_format/preprocessing.xqm
@@ -211,9 +211,9 @@ declare function pre:preprocessing
                         )
                         
                         else if ( 
-                            ( $preceding-sibling[self::text() and normalize-space(.) = ''] )
+                            ( $preceding-sibling[self::text()][matches(., "[\s\n\r\t]") and normalize-space(.) = ""] )
                             and
-                            ( $following-sibling[self::text() and normalize-space(.) = ''] )
+                            ( $following-sibling[self::text()][matches(., "[\s\n\r\t]") and normalize-space(.) = ""] )
                         ) then (
                             attribute {"break"}{"yes"}
                         )