Fix substitution for $$Contents.

The second argument here is the length of the string to replace,
not the position of the final character.

(cherry picked from commit 6b97f2c075)
This commit is contained in:
Richard Heck 2016-07-31 00:15:48 -04:00
parent a536ee7718
commit f457b11fa7
2 changed files with 3 additions and 1 deletions

View File

@ -199,7 +199,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;

View File

@ -45,6 +45,8 @@ What's new
- Fixed preview of external material with plaintext and DocBook.
- Fixed substitution for $$Contents in external templates.
* LYX2LYX