From: Peter L. <pet...@te...> - 2009-08-17 11:54:33
|
Den Monday 17 August 2009 10.11.56 skrev Benny Malengier: > 2009/8/15 Peter Landgren <pet...@te...>: > > Hi, > > > > I looked through my reported issues and found this: > > http://www.gramps-project.org/bugs/view.php?id=2848 > > > > Tried to look at it and found that in AsciiDoc.py > > #-------------------------------------------------------------------- > > # > > # Writes text. > > #-------------------------------------------------------------------- > > def write_text(self,text,mark=None): > > self.text = self.text + text > > > > 'text' sometimes contains "\n", which, if printed, should be replaced > > with 0xa. > > > > However, when printing endnotes the result is > > 2. Svenska Kyrkan, "Föddebok", Information från föddelängder, (FL) > > > > a: Engelbrekt b: Vreta Kloster > > > > when is should be > > 2. Svenska Kyrkan, "Föddebok", Information från föddelängder, (FL) > > > > a: Engelbrekt > > b: Vreta Kloster > > > > In this case the is a 0xa in the string 'b: Vreta Kloster' > > Where does this '\n' disappear? > > The error must be somewhere in the end_paragraph method. > It takes the self.text variable, and formats it to print on the file. > As this text has a leader/indent in that paragraph, my guess it the \n > are removed, and should be re-added with the defined leader/indent, > but the \n go lost. > There must be a bug there somewhere. > > Benny Yes, that's my impression too so I looked at it a bit more and found that in my test case with self.text= "a: Engelbrekt\nb: Vreta Kloster" in the method reformat_para will loose "\n" in the operation words = para.split() When the line is put together later no "\n" is used. So, maybe the call to this method should change? /Peter |