turkle
turkle copied to clipboard
Turkle rejects HTML templates that use JavaScript template literals
Discovered by an undergrad working with paulmac.
Turkle currently assumes that the syntax ${foo}
is only used for Turkle template variables. When uploading a CSV file, Turkle (currently) requires that the CSV header include a column name for each of the "template variables" it discovers.
When Mechanical Turk was first deployed, ${foo}
was not a valid JavaScript construct. But newer versions of JavaScript (apparently starting with the ES2015 standard) introduced support for Template literals (formerly called Template strings). Template literals are backtick-quoted strings that use the same ${foo}
syntax for variable substitution, e.g.:
var foo = 'world';
var x = `hello ${foo}`;
Poster: Craig Harman id: 257
Here are the HTML template and CSV file that exposed the problem:
audio-translation-json.html
json-file.csv
Poster: Craig Harman
mentioned in merge request !216
Poster: Craig Harman