diff --git a/content/dataset.html b/content/dataset.html
index e20b5271..f4f31ab0 100644
--- a/content/dataset.html
+++ b/content/dataset.html
@@ -403,7 +403,8 @@ draft: false
Reflect.setPrototypeOf(key, method.prototype)
th = $("
| ", { scope: "column" })
const meth = key
- th.clone().text(meth.toString("\n").split('-').join('\u2011')).appendTo(row)
+ const span = $("",{"data-csvtext":meth.toString()}).text(meth.toString("\n").split('-').join('\u2011'))
+ th.clone().append(span).appendTo(row)
const noNanVals = (vals.every((v) => Number.isNaN(v))) ? vals : (vals.filter((v) => !Number.isNaN(v)))
const avals = noNanVals.map(v => Math.abs(v))
th.clone().text(noNanVals.length).appendTo(row)
@@ -588,7 +589,10 @@ draft: false
var tbody = $("").appendTo(table)
var th = $(" | ", { scope: "column" })
head.append(["Molecule", "Transition"].map(x => th.clone().text(x)))
- head.append(sortedMethods.map(x => th.clone().text(x.toString("\n").split('-').join('\u2011'))))
+ head.append(sortedMethods.map(x => {
+ const span = $("",{"data-csvtext":x.toString()}).text(x.toString("\n").split('-').join('\u2011'))
+ return th.clone().append(span)
+ }))
adjustSticky();
datadic = new Map()
for (const dat of paperdata) {
diff --git a/static/js/tableToCSV.js b/static/js/tableToCSV.js
index 1824d452..566420a5 100644
--- a/static/js/tableToCSV.js
+++ b/static/js/tableToCSV.js
@@ -40,13 +40,13 @@ function tableToCSV(table) {
const rowIndex = cell.parentNode.rowIndex
if (columnspan>1) {
for (let i = 1; i < rowspan; i++) {
- csv[rowIndex].splice(colindex,0,"")
+ csv[rowIndex].splice(colindex,0,csv[rowIndex][colindex])
}
}
if (rowspan>1) {
for (let i = 0; i < columnspan; i++) {
for (let j = 1; j < rowspan; j++) {
- csv[rowIndex+j].splice(colindex,0,"")
+ csv[rowIndex+j].splice(colindex,0,csv[rowIndex][colindex])
}
}
}