mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-28 05:49:35 +00:00
+ fix bug in regex insertion (string was inserted in wrong place)
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "regexTools.h"
|
||||
#include <iostream>
|
||||
|
||||
std::map<std::string, RegexMatcher*> regexCache;
|
||||
|
||||
@ -61,7 +62,7 @@ void appendToFirstOccurence(std::string &content, const std::string regex, cons
|
||||
|
||||
if (matcher->find()) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
content.insert(matcher->start(status), replacement);
|
||||
content.insert(matcher->end(status), replacement);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user