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
Closed

Comments

@vicuna
Copy link

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
Copy link
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
Copy link
Author

vicuna commented Mar 6, 2014

Comment author: @dra27

Oh, ffs: a < br > tag!!

@vicuna
Copy link
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
Copy link
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.

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

1 participant