Skip to content

Unintentional escape characters in odoc output (html) #620

@jordwalke

Description

@jordwalke

In this odoc output for Unix, look at the function val link.
Here's what it looks like:

val link : ?⁠follow:bool -> string -> string -> unit

but copy and paste it into your clipboard, and assign it into a string in JavaScript, and look at the character position where f in "follow" should be.

var text = "val link : ?⁠follow:bool -> string -> string -> unit"
alert(text.charCodeAt(12));

It prints the char code 8288. This means there's some non printable char codes which make copy/pasting items from the page into utop or a file frustratingly fail to compile (you'll get errors about weird characters but can't see with your eyes where they are until you inspect byte by byte).

I'm assuming there was some reason why these were in there? Does anyone know the back story there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions