DeepBlueCLtd / LegacyMan

Legacy content for Field Service Manual
https://deepbluecltd.github.io/LegacyMan/index.html
Apache License 2.0
2 stars 0 forks source link

Sanitized image names not found #435

Closed IanMayo closed 1 year ago

IanMayo commented 1 year ago

The DITA compiler is complaining about lots of missing images.

These are images that have had ` replaced with_. But, when we docopytree` we copy the images over verbatim.

So, I think we have two separate sanitize methods:

  1. For content file names that we control. replace ` with_`
  2. For images that are linked to or included, replace ` with%20`

The test case for this is daf 1b.jpg under anchor_pics.html.

We are being "sheilded" from this issue because code in extract_class_images is producing duplicates of files with spaces, replacing spaces with underscores. Well, some code is putting a daf_1b.jpeg into the Contents/Images folder.

robintw commented 1 year ago

Fixed in #440, by changing everything to use sanitise_filename, so that we don't end up with any spaces in filenames at all. Safer that way, I think.