ocaml-doc / doc-ock

(DEPRECATED) Documentation generation for OCaml
ISC License
15 stars 5 forks source link

Module preambles and postambles seem to be lost #62

Closed dbuenzli closed 4 years ago

dbuenzli commented 7 years ago

Steps to reproduce:

opam switch 4.03.0
eval $(opam config env)
opam install fpath
odoc compile --output-dir /tmp/ --pkg fpath $(opam config var fpath:lib)/fpath.cmti
odoc html --output-dir /tmp/ /tmp/fpath.odoc

Now compare /tmp/Fpath/index.html with http://erratique.ch/software/fpath/doc/Fpath

dbuenzli commented 7 years ago

It seems preambles are now in. However stuff still gets lost. You can compare with

opkg ocamldoc fpath
opkg odoc fpath 
opkg doc fpath 
opkg doc --odoc fpath
lpw25 commented 7 years ago

I had a look at that file. The issue is that there is an unknown unicode character in the doc comment at line 655. Odoc sees this is an error but does not currently report these errors.

dbuenzli commented 7 years ago

Indeed thanks. I'll fix this but the tool should be robust with this. Report the error and replace the character with U+FFFD ("\xEF\xBF\xBD" in UTF-8 in OCaml).

dbuenzli commented 7 years ago

Note however that while there are funny characters on that line. The file is valid UTF-8 and the characters are not unknown. I think the issue must be rather be about handling text outside list elements in a list.

trefis commented 6 years ago

I think the issue must be rather be about handling text outside list elements in a list.

I think that's correct. I'll try to have a look at it "soon"