21993: hr should have newline before/after it. Trivial code change, a=gramps

git-svn-id: svn://10.0.0.236/trunk@56428 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
1999-12-22 22:03:49 +00:00
parent 71f0399576
commit 5d88a6253f
2 changed files with 8 additions and 0 deletions

View File

@@ -811,12 +811,16 @@ nsHTMLToTXTSinkStream::AddLeaf(const nsIParserNode& aNode)
else if (type == eHTMLTag_hr &&
(mFlags & nsIDocumentEncoder::OutputFormatted))
{
EnsureVerticalSpace(0);
// Make a line of dashes as wide as the wrap width
nsAutoString line;
int width = (mWrapColumn > 0 ? mWrapColumn : 25);
while (line.Length() < width)
line += '-';
Write(line);
EnsureVerticalSpace(0);
}
return NS_OK;