Denormalised inline calculations to property documents, needs to be referenced by UI still

This commit is contained in:
Stefan Zermatten
2021-01-29 12:29:01 +02:00
parent 9c799e3dc9
commit 1167538977
25 changed files with 360 additions and 118 deletions

View File

@@ -2,6 +2,8 @@ import evaluateString from '/imports/api/creature/computation/afterComputation/e
// Strings can have computations in bracers like so: {computation}
export default function evalutateStringWithEmbeddedCalculations(string, scope){
console.warn('evalutateStringWithEmbeddedCalculations should be replaced with ' +
'fetching the result from the compuations on the property doc');
if (!string) return string;
// Compute everything inside bracers
return string.replace(/\{([^{}]*)\}/g, function(match, p1){