ansilove.js

A script to display ANSi and artscene related file formats on web pages
Log | Files | Refs | README | LICENSE

commit 0502e5b6fe044c446ba8c78716ea4708e41a5ed2
parent 67bbb915de30525cfe25027e5b3dcad5e20b4af7
Author: Andy Herbert <andy.herbert@gmail.com>
Date:   Sat, 12 Oct 2013 13:30:56 +0100

Only perform a newline operation on CFLF.

Diffstat:
Mansilove.js | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ansilove.js b/ansilove.js @@ -924,10 +924,12 @@ var AnsiLove = (function () { } } else { switch (code) { - case 10: - newLine(); - break; case 13: + if (file.peek() === 0x0A) { + file.read(1); + newLine(); + } + break; case 26: break; default: