X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/c30cede8817ee92f1e2dd31e6d8b0c3aa4c44ee8..9b34f6d9fa60d96025fe3835777f277b9cc002ad:/latinsample.js diff --git a/latinsample.js b/latinsample.js index b576f95..fa6b0f1 100644 --- a/latinsample.js +++ b/latinsample.js @@ -22,6 +22,9 @@ function appendsample() { cols[++col] = same; } } + for (var col = 0; col < cols.length; col++) { + cols[col] = cols[col].innerHTML.trimRight(); + } // copy letters into sample var output = ''; @@ -34,12 +37,16 @@ function appendsample() { } if (col < cols.length) { - output += '' + (cols[col].innerHTML.trimRight() || ' ') + ''; + output += '' + (cols[col] || ' ') + ''; } else { output += ' '; } } + if (cols[29] && !cols[28]) { + // circumfix sign if no repetition + output = cols[29] + output + cols[29]; + } samplecol.innerHTML = output; } };