diff --git a/nw/convert/text/tomarkdown.py b/nw/convert/text/tomarkdown.py index c9ea57b7..da65d863 100644 --- a/nw/convert/text/tomarkdown.py +++ b/nw/convert/text/tomarkdown.py @@ -85,7 +85,8 @@ class ToMarkdown(Tokenizer): # indicating a new paragraph. if tType == self.T_EMPTY: if len(thisPar) > 0: - self.theResult += "%s\n\n" % " ".join(thisPar) + tTemp = "\n".join(thisPar) + self.theResult += "%s\n\n" % tTemp.rstrip() thisPar = [] elif tType == self.T_HEAD1: @@ -104,7 +105,7 @@ class ToMarkdown(Tokenizer): self.theResult += "%s\n\n" % tText elif tType == self.T_SKIP: - self.theResult += "\n\n\n\n" + self.theResult += "\n\n\n" elif tType == self.T_TEXT: thisPar.append(tText) diff --git a/nw/convert/text/totext.py b/nw/convert/text/totext.py index fa528199..1f98d5e2 100644 --- a/nw/convert/text/totext.py +++ b/nw/convert/text/totext.py @@ -122,8 +122,8 @@ class ToText(Tokenizer): tText = self._centreText(tText,self.wordWrap) self.theResult += "%s\n\n" % tText - elif tType == self.T_SEP: - self.theResult += "\n\n\n\n" + elif tType == self.T_SKIP: + self.theResult += "\n\n\n" elif tType == self.T_TEXT: thisPar.append(tText)