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

-colorize-code causes unnecessary < br> tags to be added to < pre> blocks #6341

Closed
vicuna opened this Issue Mar 6, 2014 · 4 comments

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

vicuna commented Mar 6, 2014

Original bug ID: 6341
Reporter: @dra27
Assigned to: @zoggy
Status: closed (set by @xavierleroy on 2017-09-24T15:32:58Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.01.0
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: ocamldoc
Related to: #7272

Bug description

ocamldoc adds < br> tags to the ends of lines within {[ ... ]} blocks which has the effect of inserting a blank line between each line of code. The < br> tags are not necessary within the < pre> used for formatting code.

Steps to reproduce

Create the file Broken.mli (with Unix line-endings, or it is compounded by #6340) and run ocamldoc -html -stars -colorize-code Broken.mli

(**

  • This will be broken by ocamldoc.
  • It seems unable to cope with DOS line endings.
  • {[let foo = "bar"
    *in
  • "fu" ^ foo]}
    *)

val foo : unit

Additional information

Relevant output of ocamldoc 4.01.0. All the < br> tags are unnecessary (and mangle the visual output):

< pre class="codepre">< code class="code">< span class="keyword">let< /span> foo = < span class="string">"bar"< /span>< br>
 < span class="keyword">in< /span>< br>
   < span class="string">"fu"< /span> ^ foo< /code>< /pre>< br>

There are lots of other instances of < br> being added where it shouldn't (e.g. just before < /div> in the member lists).

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Mar 6, 2014

Comment author: @dra27

OK, Mantis ate my HTML in the Additional information section. The actual output of ocamldoc includes a < br> tag at the end of each line.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Mar 6, 2014

Comment author: @dra27

Oh, ffs: a < br > tag!!

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented May 16, 2014

Comment author: @damiendoligez

Couldn't find a way to quote an HTML tag for Mantis, so I inserted spaces to make your report readable.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented May 5, 2015

Comment author: @damiendoligez

Fixed in trunk (rev 16082). I don't feel confident enough to push this fix to 4.02.2.

@vicuna vicuna closed this Sep 24, 2017

@vicuna vicuna added the ocamldoc label Mar 14, 2019

@vicuna vicuna added this to the 4.03.0 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.