The branch, xhtml/new_features/assets-separate-directory, has been updated.
- Log ----------------------------------------------------------------- commit 00b24a8984756bdc5dcd8e2b16952c86fecdf6c9 Author: Josh Hieronymus <[email protected]> Date: Tue Jul 30 18:39:35 2013 -0400 Unmangle image filenames for XHTML export diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index 55f673c..895c3d0 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -918,12 +918,16 @@ string InsetGraphics::prepareHTMLFile(OutputParams const & runparams) const if (status == FAILURE) return string(); + // Output file name as X_filename.ext, where X is zero-based index of image within file + string orig_file_name_only = params().filename.onlyFileName(); + string temp_file_name_only = temp_file.onlyFileName(); + size_t output_file_index_pos = temp_file_name_only.find('_'); + string output_file_index = temp_file_name_only.substr(0, output_file_index_pos + 1); + string output_file = output_file_index + orig_file_name_only; + // Write image either to images/ subdirectory or to default directory - string output_file; if (masterBuffer->params().html_assets_in_separate_directory) { - output_file = "images/" + onlyFileName(temp_file.absFileName()); - } else { - output_file = onlyFileName(temp_file.absFileName()); + output_file = "images/" + output_file; } string const from = formats.getFormatFromFile(temp_file); ----------------------------------------------------------------------- Summary of changes: src/insets/InsetGraphics.cpp | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) hooks/post-receive -- Repositories for GSOC work
