Fixed a bug in text formatting when an empty list is encountered.
Add test for #446
Merge branch 'garnaat-fix-445' into develop

Closes #446

* garnaat-fix-445:
  Add test for #446
  Fixed a bug in text formatting when an empty list is encountered.