View Single Post
Old 05-02-2013, 11:37 AM   #270
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Yes, it might, depending on the input material. I think I should not assume that a newline char means "open a new paragraph". Moreover, some dictionaries might come with their own markup (in the definition strings).

The issue was raised some time ago, and I decided to deal with it as follows: Penelope only reads the string corresponding to each key of the index, and (implicitly) assumes that it is "raw text". If this string contains markup (or some other formatting convention, like newlines=new paragraph), it is up to the end user dealing with it, by specifying a custom parser (e.g., by editing the provided default_parser.py and invoking penelope.py with the suitable --parser switch).

Of course, since Penelope is free software, feel free to adapt it to suit your needs.
AlPe is offline   Reply With Quote