latin: circumfix mark for code 39
[sheet.git] / latinsample.js
index b576f955514949eb24c59f3c4d93619824a6fe88..fa6b0f1ca60af7e6cae33a5dce46eb2b0fb8df5a 100644 (file)
@@ -22,6 +22,9 @@ function appendsample() {
                                cols[++col] = same;
                        }
                }
                                cols[++col] = same;
                        }
                }
+               for (var col = 0; col < cols.length; col++) {
+                       cols[col] = cols[col].innerHTML.trimRight();
+               }
 
                // copy letters into sample
                var output = '';
 
                // copy letters into sample
                var output = '';
@@ -34,12 +37,16 @@ function appendsample() {
                        }
 
                        if (col < cols.length) {
                        }
 
                        if (col < cols.length) {
-                               output += '<span>' + (cols[col].innerHTML.trimRight() || ' ') + '</span>';
+                               output += '<span>' + (cols[col] || ' ') + '</span>';
                        }
                        else {
                                output += ' ';
                        }
                }
                        }
                        else {
                                output += ' ';
                        }
                }
+               if (cols[29] && !cols[28]) {
+                       // circumfix sign if no repetition
+                       output = cols[29] + output + cols[29];
+               }
                samplecol.innerHTML = output;
        }
 };
                samplecol.innerHTML = output;
        }
 };