From ecc56ffe93282558b8de0cdb940315a7e3eaba0f Mon Sep 17 00:00:00 2001 From: Eism Date: Mon, 23 Jan 2023 12:02:26 +0200 Subject: [PATCH] fixed #15897: The C++ standard library's regex implementation does not support lookarounds --- src/engraving/libmscore/harmony.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/engraving/libmscore/harmony.cpp b/src/engraving/libmscore/harmony.cpp index 5535516478efd..670be2070aa7f 100644 --- a/src/engraving/libmscore/harmony.cpp +++ b/src/engraving/libmscore/harmony.cpp @@ -2104,11 +2104,12 @@ String Harmony::generateScreenReaderInfo() const { u"i", u"1" }, }; static std::vector > symbolReplacements { - { u"b", u"♭" }, { u"h", u"♮" }, { u"#", u"♯" }, { u"bb", u"𝄫" }, { u"##", u"𝄪" }, + { u"b", u"♭" }, // also replace b with ♭ for \b + { u"\\♭", u"b" }, // \b should be b, so need to correct replacing in the previous step // TODO: use SMuFL glyphs and translate //{ "o", ""}, //{ "0", ""}, @@ -2119,10 +2120,7 @@ String Harmony::generateScreenReaderInfo() const aux.replace(r.first, r.second); } for (auto const& r : symbolReplacements) { - // only replace when not preceded by backslash - String s = u"(?