X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/a0f942a8498d6f1574c57c5943a7d21eb9634898..da9b71275d04f35c77a48e3bbaee356c04fd24b2:/latinsample.js diff --git a/latinsample.js b/latinsample.js index cff51e3..b576f95 100644 --- a/latinsample.js +++ b/latinsample.js @@ -29,8 +29,12 @@ function appendsample() { for (var i = 0; i < input.length; i++) { var col = input.charCodeAt(i) - 64; if (col < 1) col = 27; // space + else if (cols[28] && i && col == input.charCodeAt(i - 1) - 64) { + col = 28; // repetition char + } + if (col < cols.length) { - output += '' + cols[col].innerHTML.trimRight() + ''; + output += '' + (cols[col].innerHTML.trimRight() || ' ') + ''; } else { output += ' ';