https://bugs.documentfoundation.org/show_bug.cgi?id=161932

            Bug ID: 161932
           Summary: Replacing text in italics with regular expressions
                    (.*?) changes the original italics
           Product: LibreOffice
           Version: 24.2.4.2 release
          Hardware: ARM
                OS: macOS (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: grass...@gmail.com

Description:
When searching and replacing characters around a given string containing some
italics, the $1 replacement option does not work as espected, that is, it
changes which characters are in italics.
Expression used 
Search: (\x20*)([\-|—|–]|\-{1,})([\x20]*)(.*?)([\x20]*)([\-|—|–]|\-{1,})(\x20*)
Replace: –⁠ $4 ⁠–$7
(text example in the attached file)

Steps to Reproduce:
1.Open attached file
2.Apply regular expression to the three portions of the text concerned under
the title Before replacement, there are two words in italics: garçons and
morceau.
3.After replacement, some italics have been shifted as shown in the same file
under the headings: After replacement and Highlighting of the italics changed

Actual Results:
Italics of original shifted

Expected Results:
They should remain where they are


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.2.4.2 (AARCH64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx
Locale: en-US (en.UTF-8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to