Use a unicode space character that isn't stripped. Since I didn;t write this bit of code, I cannot comment on why leading/trailing spaces are stripped, but I'd imagine it is to be consistent with the way spaces are handled everywhere else in calibre.
|