10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-03 18:06:06 +02:00

Use plain text for \ce in select

This commit is contained in:
Mickaël Véril 2020-04-29 15:44:45 +02:00
parent 75c849cf98
commit 31163a427e

View File

@ -208,8 +208,13 @@ draft: false
return sets.has(value) ? sets.get(value) : value.toString()
break;
case "molecule":
const mhchemCE=/^\\ce\{.*\}$/
return mhchemCE.test(value) ? "\\("+value.toString()+"\\)" : value.toString()
const mhchemCE=/^\\ce\{(.*)\}$/
const m=value.match(mhchemCE)
if (m) {
return m[1]
} else {
return value
}
break;
default:
return value.toString()