commit 7b5472df3f65f2c5aaeebdb72eda1c0cac27790d
Author: Udi Fogiel <[email protected]>
Date:   Sat Jul 25 23:06:45 2026 +0300

    escape unicode/invisible chars in revert_numeric
    
    This is more human readable and editor freindly
---
 lib/lyx2lyx/lyx_2_6.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/lyx2lyx/lyx_2_6.py b/lib/lyx2lyx/lyx_2_6.py
index 2889a81050..d25fa16f7b 100644
--- a/lib/lyx2lyx/lyx_2_6.py
+++ b/lib/lyx2lyx/lyx_2_6.py
@@ -1017,13 +1017,13 @@ def revert_numeric(document):
                 if first_digit > 0:
                     sign_pos = start - 1
                     sign_at_word_start = (
-                        merged[sign_pos - 1] in " 

" if sign_pos > 0
+                        merged[sign_pos - 1] in "\u0020\u2028\u2029" if 
sign_pos > 0
                         else at_word_start)
                     if merged[sign_pos] in "+-" and sign_at_word_start:
                         start = sign_pos
                 matches.append((start, m.end()))
 
-        at_word_start = merged[-1] in " 

" if merged else at_word_start
+        at_word_start = merged[-1] in "\u0020\u2028\u2029" if merged else 
at_word_start
         if not matches:
             i = j + 1
             continue
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to