Fix substitution for $$Contents.

The second argument here is the length of the string to replace,
not the position of the final character.
This commit is contained in:
Richard Heck 2016-07-31 00:15:48 -04:00
parent d142ab94ef
commit 6b97f2c075

View File

@ -200,7 +200,7 @@ string const doSubstitution(InsetExternalParams const & params,
size_t const pos = result.find("$$Contents(\"");
size_t const end = result.find("\")", pos);
result.replace(pos, end + 2, contents);
result.replace(pos, end + 2- pos, contents);
}
return result;