dsheets / codoc

OCaml documentation generator
34 stars 5 forks source link

Fix string escaping issue #80

Closed dbuenzli closed 9 years ago

dbuenzli commented 9 years ago

We already saw that the other day with @dsheets. I'm sure this is the wrong tracker, I let you redirect.

Here's a minimal repro case:

> mkdir /tmp/test
> cat - > /tmp/test/bla.mli
val v : int
(** ["r\xC3\xC9volte"] *)
> ocamlc -bin-annot -c /tmp/test/bla.mli
> codoc doc -f -o /tmp/doc /tmp/test
Could not render HTML without errors. Terminating.
codoc.native: 
              /tmp/doc/bla/index.xml:2:748: XML error malformed character
              stream
   1 cmti under /tmp/test
dsheets commented 9 years ago

Congrats! You found an OCaml lexer bug. @lpw25

dsheets commented 9 years ago

lpw25/doc-ock-xml#15 will address the fact that the bad bytes made it all the way to a serialization format.

dbuenzli commented 9 years ago

Congrats! You found an OCaml lexer bug. @lpw25

Interesting does it mean that ocamldoc uses another lexer, as the latter is able to interpret this correctly.