diff --git a/share/manifest b/share/manifest index 6afd97d..7227a8c 100644 --- a/share/manifest +++ b/share/manifest @@ -1,4 +1,4 @@ -# manifest +# pdf2htmlEX manifest # by WangLu # 2012.09.12 # @@ -21,39 +21,53 @@ """ + # base CSS styles @base.css - # PDF specific CSS styles $css - # necessary Javascript codes @jquery.js @pdf2htmlEX.js +# entry point of pdf2htmlEX """ +""" +""" -
""" +# The container of outline +# By default this is hidden, pdf2htmlEX.js will add the 'opened' class if it is not empty +# You can add a class 'opened' here if you want it always opened or you don't use pdf2htmlEX.js +# e.g. +#
+""" +
+""" $outline - """
+""" + +# The container of PDF pages +# check base.css for an example and requirements of its CSS styles +"""
""" - -# PDF pages $pages - """
+""" + + +""" """ diff --git a/share/pdf2htmlEX.js b/share/pdf2htmlEX.js index 84e0eb2..b50e82d 100644 --- a/share/pdf2htmlEX.js +++ b/share/pdf2htmlEX.js @@ -118,8 +118,8 @@ var pdf2htmlEX = (function(){ this.container = $('#'+this.container_id); // need a better design - if(this.outline.children().length == 0) { - this.outline.toggleClass('opened'); + if(this.outline.children().length > 0) { + this.outline.addClass('opened'); } var new_pages = new Array(); diff --git a/src/HTMLRenderer/general.cc b/src/HTMLRenderer/general.cc index a3bfae2..e67237d 100644 --- a/src/HTMLRenderer/general.cc +++ b/src/HTMLRenderer/general.cc @@ -392,7 +392,9 @@ void HTMLRenderer::post_process() continue; } - if(line.empty() || line[0] == '#') + if(line.empty() + || (line.find_first_not_of(' ') == string::npos) + || line[0] == '#') continue;