Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007352OCamlocamldocpublic2016-09-10 14:232017-03-15 23:08
Reporterdbuenzli 
Assigned Tooctachron 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.03.0 
Target Version4.05.0+devFixed in Version4.06.0+dev 
Summary0007352: ocamldoc should not generate p's white only whitespace in it
DescriptionThey sometimes introduce unwanted whitespace in the rendered output and makes it difficult to design a consistent stylesheet (you randomly get either too much whitespace or too little). Using a p:empty rule to hide them is impossible since they do actually have content in it.

Here are a few examples of this.

Before this h2:
http://erratique.ch/tmp/opkg-ocamldoc/var/cache/opkg/ocamldoc/astring/Astring.html#porttrim [^]
Source:
https://github.com/dbuenzli/astring/blob/master/src/astring.mli#L1225 [^]

Before this h1:
http://erratique.ch/tmp/opkg-ocamldoc/var/cache/opkg/ocamldoc/astring/Astring.html#port [^]
Source:
https://github.com/dbuenzli/astring/blob/master/src/astring.mli#L1198 [^]

Before and after this h1:
http://erratique.ch/tmp/opkg-ocamldoc/var/cache/opkg/ocamldoc/react/React.html#basics [^]
Source:
https://github.com/dbuenzli/react/blob/master/src/react.mli#L821 [^]

It seems that it's before header introductions but I wouldn't swear I didn't see this in other places.













  
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016282)
dbuenzli (reporter)
2016-09-10 14:25

Note that for example this h2

http://erratique.ch/tmp/opkg-ocamldoc/var/cache/opkg/ocamldoc/react/React.html#evsem [^]

has no empty p before. Here's the source:

https://github.com/dbuenzli/react/blob/master/src/react.mli#L772 [^]
(0016283)
dbuenzli (reporter)
2016-09-10 14:54

Note that in general ocamldoc is really a bit too fiddly with whitespace. It should really follow the simple rules that are present in most ASCII markup languages, which is basically to always generate blocks, those being either separated syntactically by one of its markup language level block or by a blank line.

So for example all the following examples should really only generate a p followed by a pre followed by a p and nothing else.
---
p1{[pre]}p2
---
p1
{[pre]}p2
---
p1{[pre]}
p2
---
p1

{[pre]}

p2
----
etc.
(0017680)
octachron (developer)
2017-03-15 23:08

This should be fixed in 4.06 by https://github.com/ocaml/ocaml/pull/804. [^]

- Issue History
Date Modified Username Field Change
2016-09-10 14:23 dbuenzli New Issue
2016-09-10 14:25 dbuenzli Note Added: 0016282
2016-09-10 14:54 dbuenzli Note Added: 0016283
2016-09-27 16:46 doligez Status new => acknowledged
2016-09-27 16:46 doligez Target Version => 4.05.0+dev
2017-02-23 16:46 doligez Category OCamldoc => ocamldoc
2017-03-15 23:08 octachron Note Added: 0017680
2017-03-15 23:08 octachron Status acknowledged => resolved
2017-03-15 23:08 octachron Fixed in Version => 4.06.0+dev
2017-03-15 23:08 octachron Resolution open => fixed
2017-03-15 23:08 octachron Assigned To => octachron


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker