Skip to content

Commit 48cfce3

Browse files
authored
Generate endline for html files (#954)
1 parent ff497a3 commit 48cfce3

File tree

369 files changed

+378
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

369 files changed

+378
-370
lines changed

src/html/html_page.ml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,11 @@ let page_creator ~config ~url ~uses_katex header breadcrumbs toc content =
146146
in
147147
let htmlpp = Html.pp ~indent:(Config.indent config) () in
148148
let html = Html.html head (Html.body ~a:[ Html.a_class [ "odoc" ] ] body) in
149-
let content ppf = htmlpp ppf html in
149+
let content ppf =
150+
htmlpp ppf html;
151+
(* Tyxml's pp doesn't output a newline a the end, so we force one *)
152+
Format.pp_force_newline ppf ()
153+
in
150154
content
151155

152156
let make ~config ~url ~header ~breadcrumbs ~toc ~uses_katex content children =
@@ -206,7 +210,11 @@ let src_page_creator ~breadcrumbs ~config ~url ~header name content =
206210
let html =
207211
Html.html head (Html.body ~a:[ Html.a_class [ "odoc-src" ] ] body)
208212
in
209-
let content ppf = htmlpp ppf html in
213+
let content ppf =
214+
htmlpp ppf html;
215+
(* Tyxml's pp doesn't output a newline a the end, so we force one *)
216+
Format.pp_force_newline ppf ()
217+
in
210218
content
211219

212220
let make_src ~config ~url ~breadcrumbs ~header title content =

test/generators/html/Alerts-Top1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ <h1>Module <code><span>Alerts.Top1</span></code></h1><p>Top-comment.</p>
1818
</ul>
1919
</header><div class="odoc-content"></div>
2020
</body>
21-
</html>
21+
</html>

test/generators/html/Alerts-Top2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ <h1>Module <code><span>Alerts.Top2</span></code></h1><p>Top-comment.</p>
1818
</ul>
1919
</header><div class="odoc-content"></div>
2020
</body>
21-
</html>
21+
</html>

test/generators/html/Alerts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ <h1>Module <code><span>Alerts</span></code></h1>
119119
</div>
120120
</div>
121121
</body>
122-
</html>
122+
</html>

test/generators/html/Alias-X.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ <h1>Module <code><span>Alias.X</span></code></h1>
2929
</div>
3030
</div>
3131
</body>
32-
</html>
32+
</html>

test/generators/html/Alias.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ <h1>Module <code><span>Alias</span></code></h1>
2525
</div>
2626
</div>
2727
</body>
28-
</html>
28+
</html>

test/generators/html/Bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ <h1>Module <code><span>Bugs</span></code></h1>
4141
</div>
4242
</div>
4343
</body>
44-
</html>
44+
</html>

test/generators/html/Bugs_post_406-class-let_open'.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
<h1>Class <code><span>Bugs_post_406.let_open'</span></code></h1>
1616
</header><div class="odoc-content"></div>
1717
</body>
18-
</html>
18+
</html>

test/generators/html/Bugs_post_406-class-type-let_open.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
<h1>Class type <code><span>Bugs_post_406.let_open</span></code></h1>
1616
</header><div class="odoc-content"></div>
1717
</body>
18-
</html>
18+
</html>

test/generators/html/Bugs_post_406.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ <h1>Module <code><span>Bugs_post_406</span></code></h1>
4343
</div>
4444
</div>
4545
</body>
46-
</html>
46+
</html>

0 commit comments

Comments
 (0)