From d0cca5f0bca7ddf2b1f4681fb76132c76b59ab37 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 5 Jan 2019 14:52:23 +0100 Subject: Fixed missing end paragraph marker when inline image appeared as last item. --- src/htmldocvisitor.cpp | 7 ++++++- testing/runtests.py | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index f89f79e..61212ce 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -126,7 +126,6 @@ static bool mustBeOutsideParagraph(DocNode *n) case DocNode::Kind_Internal: /*
*/ case DocNode::Kind_Include: - case DocNode::Kind_Image: case DocNode::Kind_SecRefList: /*
*/ case DocNode::Kind_HorRuler: @@ -152,6 +151,8 @@ static bool mustBeOutsideParagraph(DocNode *n) ((DocStyleChange*)n)->style()==DocStyleChange::Center; case DocNode::Kind_Formula: return !((DocFormula*)n)->isInline(); + case DocNode::Kind_Image: + return !((DocImage*)n)->isInlineImage(); default: break; } @@ -1205,6 +1206,10 @@ void HtmlDocVisitor::visitPre(DocPara *p) void HtmlDocVisitor::visitPost(DocPara *p) { + + //printf("DocPara::visitPost: parent of kind %d ", + // p->parent() ? p->parent()->kind() : -1); + bool needsTag = FALSE; if (p->parent()) { diff --git a/testing/runtests.py b/testing/runtests.py index 452c36e..0ff0e6f 100755 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -336,8 +336,9 @@ class TestManager: return 0 if self.args.updateref else res def prepare_dtd(self): - shutil.rmtree("dtd",ignore_errors=True) - shutil.copytree(self.args.inputdir+"/dtd", "dtd") + if self.args.inputdir!='.': + shutil.rmtree("dtd",ignore_errors=True) + shutil.copytree(self.args.inputdir+"/dtd", "dtd") def main(): # argument handling -- cgit v0.12