sustrik / ribosome

Simple code generator
248 stars 21 forks source link

Python ribosome cannot handle empty variables #51

Closed KerstinKeller closed 8 years ago

KerstinKeller commented 8 years ago

It seems that ribosome.py cannot handle empty string variables for output generation. E.g.

var = ""
.Hello @{var}!

I expect that it would output

Hello !

but the output file is empty.

On the other hand

var = "World"
.Hello @{var}!

correctly outputs

Hello World!
KerstinKeller commented 8 years ago

It seems to me, that ribosome.py is missing a return statement on line 116 in the function trim.

sustrik commented 8 years ago

Correct. Would you like to send a pull request?

sustrik commented 8 years ago

Fixed.