diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-03-01 14:08:27 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-03-28 10:25:57 -0400 |
commit | 2d7214ce60ef55b0d3d6e98b86f41b4e9fce5c48 (patch) | |
tree | 7f22be61c951fae2ba1477a60650389891a671bb /ext/mixed/js | |
parent | 047efaa3dbe48cde7ea3b96ff6ef0ac07df0ce42 (diff) |
Add metadata for unique expression count
Diffstat (limited to 'ext/mixed/js')
-rw-r--r-- | ext/mixed/js/display-generator.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/mixed/js/display-generator.js b/ext/mixed/js/display-generator.js index e9cdd998..fd7c5c1f 100644 --- a/ext/mixed/js/display-generator.js +++ b/ext/mixed/js/display-generator.js @@ -45,11 +45,13 @@ class DisplayGenerator { const definitionMulti = Array.isArray(details.definitions); const expressionCount = expressionMulti ? details.expressions.length : 1; const definitionCount = definitionMulti ? details.definitions.length : 1; + const uniqueExpressionCount = Array.isArray(details.expression) ? new Set(details.expression).size : 1; node.dataset.expressionMulti = `${expressionMulti}`; node.dataset.definitionMulti = `${definitionMulti}`; node.dataset.expressionCount = `${expressionCount}`; node.dataset.definitionCount = `${definitionCount}`; + node.dataset.uniqueExpressionCount = `${uniqueExpressionCount}`; bodyContainer.dataset.sectionCount = `${ (definitionCount > 0 ? 1 : 0) |