X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/ecafe82fb6cb293e9cf45a6a2f6474858f429221..81b8b432d591d72e5ccacd3df9d39fbc2930216b:/latinsample.js diff --git a/latinsample.js b/latinsample.js index 37d3231..406cac1 100644 --- a/latinsample.js +++ b/latinsample.js @@ -39,12 +39,15 @@ function appendsample() { else if (cols[28] && i && col == input.charCodeAt(i - 1) - 64) { col = 28; // repetition char } - - if (col < cols.length) { + if (row.id == 'suetterlin' && col == 19) { + var final = input.length == i + 1 || input[i + 1] == ' '; + output += cols[col].split(' ')[final ? 1 : 0]; + } + else if (col < cols.length) { output += '' + (cols[col] || ' ') + ''; } else { - output += ' '; + output += ' '; } if (row.parentNode.tagName == 'THEAD') { output += col < 26 ? ' ' : '· '; // number separator @@ -52,7 +55,7 @@ function appendsample() { } if (cols[29] && !cols[28]) { // circumfix sign if no repetition - output = cols[29] + output + cols[29]; + output = cols[29] + output + (cols[30] || cols[29]); } samplecol.innerHTML = output; }