Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML output of ocamldoc is strange #7411

Closed
vicuna opened this issue Nov 12, 2016 · 3 comments
Closed

HTML output of ocamldoc is strange #7411

vicuna opened this issue Nov 12, 2016 · 3 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Nov 12, 2016

Original bug ID: 7411
Reporter: kosik
Assigned to: @Octachron
Status: resolved (set by @Octachron on 2017-04-04T15:05:30Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.3
Fixed in version: 4.04.1+dev
Category: ocamldoc

Bug description

If I have a file with the following contents:

module IntSet = Set.Make(struct
type t = int
let compare = compare
end)

and I use ocamldoc to generate HTML:

ocamldoc -html main.ml

then the resulting HTML contains some unexpected:

  • vertical skip between line
    "module IntSet: Set.Make(sig"
    and line
    "type t = int "
  • even bigger vertical skip between line
    "type t = int "
    and line:
    "val compare : 'a -> 'a -> int"

I am (just) guessing that this is not an expected behavior.

File attachments

@vicuna
Copy link
Author

vicuna commented Nov 12, 2016

Comment author: @Octachron

In this case, the html generated by ocamldoc uses a "pre" tag for the module(sig ...end) part and is not careful enough with whitespace, resulting with this anarchic proliferation of whitespaces.

Since the "pre" tag is not that meaningful here, I would argue that simply closing it at the start of the signature would be enough.

@vicuna
Copy link
Author

vicuna commented Nov 13, 2016

Comment author: @Octachron

I have a potential fix for the problem here: #914.

@vicuna
Copy link
Author

vicuna commented Apr 4, 2017

Comment author: @Octachron

The above github PR have been integrated into the 4.04.1 release, fixing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants