ScribusGenerator
ScribusGenerator copied to clipboard
Initial space after a delimiter it is ignored
Initial space after a delimiter it is ignored.
Example
csv:
foo,bar
hello, and some more text
text:
This is some text%VAR_bar%.
This should be transformed into
This is some text and some more text.
but instead is transformed into
This is some textand some more text.
Workaround
Use quotes in csv (but not all tools support this) csv:
foo,bar
hello," and some more text"
Fix
Set skipinitialspace=False
in https://github.com/berteh/ScribusGenerator/blob/master/ScribusGeneratorBackend.py#L559
I'm not sure why it was set to True
. Is there any reason? If not I'm more than happy to provide a PR 😁
PS: Thanks for your nice script!
Seems like skipinitialspace=True
was introduced by ec0305030b5de5081a37c50a2e4268f6ba20f447.
Is skipinitialspace=True
really necessary to support escaping quotes in data using double: ""?
Thanks @fvollmer for your issue report and sorry for my late answer. No indeed I don't see why the skipinitialspace should be put to True by default... even if it sounded like a good idea at the time. fee free to put a PR to correct this. thanks !