libdot: improve handling of escapes with string embedding
The current logic does not take into account any embedded escapes which
can easily break things. For example, it might turn '...\x1b[...' into:
'...\x1' +
'b[...' +
Which is invalid in JavaScript.
Change the logic to not wrap lines at all if it has an embedded escape
sequence, and delay the single quote escaping until after we break up
the line. This latter part might make the line "too" long, but since
we're already admitting "best effort" here for style, it's not that big
of a deal.
Also document that we strip out newlines. This isn't new behavior, it
just wasn't explicitly documented previously.
Finally while we're here, clean up the end of the string a bit so we
don't have to end every embedded resource with a dummy ''.
Change-Id: I80450959188573d0a608298982cb42b5caf34341
Reviewed-on: https://chromium-review.googlesource.com/889938
Reviewed-by: Brandon Gilmore <varz@google.com>
Tested-by: Mike Frysinger <vapier@chromium.org>

Hello

There is also a mirror on github at https://github.com/libapps/libapps-mirror. A few subprojects are also extracted out into their own git repo and mirrored. Keep in mind that these mirrors may occasionally be behind the official repository.

Top level directories

libdot/ is a small set of JS libraries initially developed as part of hterm, now available as shared code.

hterm/ is a JS library that provides a terminal emulator. It is reasonably fast, reasonably correct, and reasonably portable across browsers.

nassh/ is the Secure Shell Chrome App (currently a “v1.5” app, soon to become a “v2” or platform app) that combines hterm with a NaCl build of OpenSSH to provide a PuTTY-like app for Chrome users.

ssh_client/ is the NaCl port of OpenSSH. It is used by nassh to create the Secure Shell App.

wash/ is a library for cross-origin virtual filesystems, similar to the Plan 9 filesystem. This directory also contains a simple bash-like shell environment for exploring these filesystems. The code in this directory is a work-in-progress.