10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-04 13:13:55 +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() return sets.has(value) ? sets.get(value) : value.toString()
break; break;
case "molecule": case "molecule":
const mhchemCE=/^\\ce\{.*\}$/ const mhchemCE=/^\\ce\{(.*)\}$/
return mhchemCE.test(value) ? "\\("+value.toString()+"\\)" : value.toString() const m=value.match(mhchemCE)
if (m) {
return m[1]
} else {
return value
}
break; break;
default: default:
return value.toString() return value.toString()