10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-24 13:23:40 +01: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()