Fixed hard line breaks in markdown export
This commit is contained in:
@@ -85,7 +85,8 @@ class ToMarkdown(Tokenizer):
|
|||||||
# indicating a new paragraph.
|
# indicating a new paragraph.
|
||||||
if tType == self.T_EMPTY:
|
if tType == self.T_EMPTY:
|
||||||
if len(thisPar) > 0:
|
if len(thisPar) > 0:
|
||||||
self.theResult += "%s\n\n" % " ".join(thisPar)
|
tTemp = "\n".join(thisPar)
|
||||||
|
self.theResult += "%s\n\n" % tTemp.rstrip()
|
||||||
thisPar = []
|
thisPar = []
|
||||||
|
|
||||||
elif tType == self.T_HEAD1:
|
elif tType == self.T_HEAD1:
|
||||||
@@ -104,7 +105,7 @@ class ToMarkdown(Tokenizer):
|
|||||||
self.theResult += "%s\n\n" % tText
|
self.theResult += "%s\n\n" % tText
|
||||||
|
|
||||||
elif tType == self.T_SKIP:
|
elif tType == self.T_SKIP:
|
||||||
self.theResult += "\n\n\n\n"
|
self.theResult += "\n\n\n"
|
||||||
|
|
||||||
elif tType == self.T_TEXT:
|
elif tType == self.T_TEXT:
|
||||||
thisPar.append(tText)
|
thisPar.append(tText)
|
||||||
|
|||||||
@@ -122,8 +122,8 @@ class ToText(Tokenizer):
|
|||||||
tText = self._centreText(tText,self.wordWrap)
|
tText = self._centreText(tText,self.wordWrap)
|
||||||
self.theResult += "%s\n\n" % tText
|
self.theResult += "%s\n\n" % tText
|
||||||
|
|
||||||
elif tType == self.T_SEP:
|
elif tType == self.T_SKIP:
|
||||||
self.theResult += "\n\n\n\n"
|
self.theResult += "\n\n\n"
|
||||||
|
|
||||||
elif tType == self.T_TEXT:
|
elif tType == self.T_TEXT:
|
||||||
thisPar.append(tText)
|
thisPar.append(tText)
|
||||||
|
|||||||
Reference in New Issue
Block a user