Quote:
Originally Posted by capink
It is working.  I also strip the leading and trailing white space after that using strip().
Code:
def safe_format(fmt, kwargs_, error_value, book, **kwargs):
output = SafeFormat().safe_format(fmt, kwargs_, error_value, book, strip_results=False, **kwargs)
return output.strip()
|
The change is now in calibre source.
In addition, I improved the performance of the formatter parser by using table lookup instead of a series of 'if's to generate the interpretable syntax tree. Could you use the new version? I don't think I broke anything, but I have said that before.