[Libreoffice-bugs] [Bug 138489] New: Search and replace with regex $1 deletes existing emphasis or italics Editing, Search Replace, Regular expressions
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Nov 25 13:24:52 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=138489
Bug ID: 138489
Summary: Search and replace with regex $1 deletes existing
emphasis or italics Editing, Search Replace, Regular
expressions
Product: LibreOffice
Version: 6.4.6.2 release
Hardware: All
OS: Mac OS X (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: grassode at gmail.com
Description:
When using a search and replace string such as this one:
(\s+)([—|–]|\-{1,})(\s*)(.*?)(\s*)([—|–]|\-{1,})
and replace the results with
–$4–
any emphasis or italics (ith happens both when italics/emphasis is the only
formatting and when it is just a word which is in italics/emphasis) is gone and
one finds a text in with the regular format instead.
Steps to Reproduce:
1. Create or upload the attached document with - word italicsword word -.
2. Use Regex (\s+)([—|–]|\-{1,})(\s*)(.*?)(\s*)([—|–]|\-{1,}) to find the
instance.
3. Replace with –$4–
Actual Results:
Italics/emphasis is gone
Expected Results:
Italics and emphasis should remain since I do not want to change them.
Reproducible: Always
User Profile Reset: No
Additional Info:
If it is not a bug and meant to be working like this, maybe a "keep format"
option could be added to the search and replace window since the change which
occurs is not desired by the user. It does happen with other search and replace
strings (quotes for example) (\s+)([—|“]|\-{1,})(\s*)(.*?)(\s*)([—|”]|\-{1,})
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201125/08ed35c9/attachment.htm>
More information about the Libreoffice-bugs
mailing list