diff --git a/experiments/.html-tidy b/experiments/.html-tidy
new file mode 100644
index 000000000..58487a897
--- /dev/null
+++ b/experiments/.html-tidy
@@ -0,0 +1,99 @@
+accessibility-check: 0 (Tidy Classic)
+add-meta-charset: no
+add-xml-decl: no
+add-xml-space: no
+alt-text:
+anchor-as-name: yes
+ascii-chars: no
+assume-xml-procins: no
+bare: no
+break-before-br: no
+char-encoding: utf8
+clean: no
+coerce-endtags: no
+css-prefix: c
+custom-tags: no
+decorate-inferred-ul: no
+doctype: html5
+drop-empty-elements: no
+drop-empty-paras: no
+drop-proprietary-attributes: no
+enclose-block-text: no
+enclose-text: no
+error-file:
+escape-cdata: no
+escape-scripts: yes
+fix-backslash: yes
+fix-bad-comments: auto
+fix-style-tags: yes
+fix-uri: no
+force-output: yes
+gdoc: no
+gnu-emacs: no
+hide-comments: no
+indent: auto
+indent-attributes: no
+indent-cdata: no
+indent-spaces: 2
+indent-with-tabs: no
+input-encoding: utf8
+input-xml: no
+join-classes: no
+join-styles: yes
+keep-tabs: no
+keep-time: no
+literal-attributes: no
+logical-emphasis: no
+lower-literals: yes
+markup: yes
+merge-divs: auto
+merge-emphasis: yes
+merge-spans: auto
+mute:
+mute-id: no
+ncr: yes
+new-blocklevel-tags: x-odr-s
+new-empty-tags:
+new-inline-tags:
+new-pre-tags:
+newline: LF
+numeric-entities: no
+omit-optional-tags: no
+output-bom: auto
+output-encoding: utf8
+output-file:
+output-html: no
+output-xhtml: no
+output-xml: no
+preserve-entities: yes
+priority-attributes:
+punctuation-wrap: no
+quiet: no
+quote-ampersand: yes
+quote-marks: no
+quote-nbsp: yes
+repeated-attributes: keep-last
+replace-color: no
+show-body-only: no
+show-errors: 6
+show-info: yes
+show-meta-change: no
+show-warnings: yes
+skip-nested: yes
+sort-attributes: alpha
+strict-tags-attributes: no
+tab-size: 4
+tidy-mark: no
+uppercase-attributes: no
+uppercase-tags: no
+vertical-space: no
+warn-proprietary-attributes: yes
+word-2000: no
+wrap: 0
+wrap-asp: no
+wrap-attributes: no
+wrap-jste: no
+wrap-php: no
+wrap-script-literals: no
+wrap-sections: no
+write-back: no
\ No newline at end of file
diff --git a/src/odr/internal/html/document_element.cpp b/src/odr/internal/html/document_element.cpp
index 4e7e428c1..34f33aa68 100644
--- a/src/odr/internal/html/document_element.cpp
+++ b/src/odr/internal/html/document_element.cpp
@@ -250,11 +250,10 @@ void html::translate_line_break(Element element, std::ostream &out,
void html::translate_paragraph(Element element, std::ostream &out,
const HtmlConfig &config) {
auto paragraph = element.paragraph();
- auto text_style_attribute =
- optional_style_attribute(translate_text_style(paragraph.text_style()));
out << "";
translate_children(paragraph.children(), out, config);
if (paragraph.first_child()) {
@@ -265,6 +264,8 @@ void html::translate_paragraph(Element element, std::ostream &out,
// TODO example `style-missing+image-1.odt` first paragraph has no height
} else {
+ auto text_style_attribute =
+ optional_style_attribute(translate_text_style(paragraph.text_style()));
out << "";
}
out << "";
@@ -398,12 +399,10 @@ void html::translate_frame(Element element, std::ostream &out,
auto style = frame.style();
out << "
";
translate_children(frame.children(), out, config);
-
out << "