mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 18:52:46 +00:00
Fix use of std::regex_match
This commit is contained in:
parent
e8ee0100fc
commit
467d57bca1
@ -1191,14 +1191,9 @@ void InsetBibtex::docbook(XMLStream & xs, OutputParams const &) const
|
|||||||
while (tagIt != tagEnd) {
|
while (tagIt != tagEnd) {
|
||||||
string tag = tagIt->str(); // regex_match cannot work with temporary strings.
|
string tag = tagIt->str(); // regex_match cannot work with temporary strings.
|
||||||
++tagIt;
|
++tagIt;
|
||||||
std::regex_match(tag, match, tagRegex);
|
regex_match(tag, match, tagRegex);
|
||||||
|
|
||||||
if (toDocBookTag.find(match[1]) == toDocBookTag.end()) {
|
|
||||||
LYXERR0("The BibTeX field " << match[1].str() << " is unknown.");
|
|
||||||
xs << XMLStream::ESCAPE_NONE << from_utf8("<!-- Output Error: The BibTeX field " + match[1].str() + " is unknown -->\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (regex_match(tag, match, tagRegex)) {
|
||||||
if (toDocBookTag[match[1]] == "SPECIFIC") {
|
if (toDocBookTag[match[1]] == "SPECIFIC") {
|
||||||
delayedTags[match[1]] = match[2];
|
delayedTags[match[1]] = match[2];
|
||||||
} else {
|
} else {
|
||||||
@ -1206,6 +1201,10 @@ void InsetBibtex::docbook(XMLStream & xs, OutputParams const &) const
|
|||||||
xs << from_utf8(match[2].str());
|
xs << from_utf8(match[2].str());
|
||||||
xs << xml::EndTag(toDocBookTag[match[1]]);
|
xs << xml::EndTag(toDocBookTag[match[1]]);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
LYXERR0("The BibTeX field " << match[1].str() << " is unknown.");
|
||||||
|
xs << XMLStream::ESCAPE_NONE << from_utf8("<!-- Output Error: The BibTeX field " + match[1].str() + " is unknown -->\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type of document (book, journal paper, etc.).
|
// Type of document (book, journal paper, etc.).
|
||||||
|
Loading…
Reference in New Issue
Block a user