[poppler] Branch 'poppler-0.18' - utils/HtmlOutputDev.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Feb 9 12:56:33 PST 2012


 utils/HtmlOutputDev.cc |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit bf81250ff7d0968852fc7559fafb6389cd695b91
Author: Igor Slepchin <igor.slepchin at gmail.com>
Date:   Wed Feb 8 19:22:13 2012 -0500

    Close li tags in generated outlines.
    
    Also, add newlines after ul tags for better readability.
    Bug #45807

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 53dd657..c760426 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1631,7 +1631,7 @@ GBool HtmlOutputDev::newOutlineLevel(FILE *output, GooList *outlines, Catalog* c
 		fputs("<A name=\"outline\"></a>", output);
 		fputs("<h1>Document Outline</h1>\n", output);
 	}
-	fputs("<ul>",output);
+	fputs("<ul>\n",output);
 
 	for (int i = 0; i < outlines->getLength(); i++)
 	{
@@ -1695,16 +1695,19 @@ GBool HtmlOutputDev::newOutlineLevel(FILE *output, GooList *outlines, Catalog* c
 			fputs("</A>",output);
 			delete linkName;
 		}
-		fputs("\n",output);
 		delete titleStr;
 		atLeastOne = gTrue;
 
 		item->open();
 		if (item->hasKids())
+		{
+			fputs("\n",output);
 			newOutlineLevel(output, item->getKids(), catalog, level+1);
+		}
 		item->close();
+		fputs("</li>\n",output);
 	}
-	fputs("</ul>",output);
+	fputs("</ul>\n",output);
 
 	return atLeastOne;
 }


More information about the poppler mailing list