0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-27 07:23:09 +00:00

tweak cClass logic

This commit is contained in:
Trevor Buckner
2023-07-04 03:31:21 -04:00
committed by Charlie Humphreys
parent ebbf0ca88b
commit 8e40cec051
3 changed files with 9 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ module.exports = function(CodeMirror, widgets, cm, setHints) {
pattern : PATTERNS.widget[widget.type](widget.name),
createWidget : (n, node)=>{
const parent = document.createElement('div');
const classes = (widget.classes || []).map((c, i)=>cClass(cm, n, `{{${widget.name}`, c));
const classes = (widget.classes || []).map((c, i)=>cClass(cm, n, `${widget.name}`, c));
const fieldNames = (widget.fields || []).map((f)=>f.name);
const fields = (widget.fields || []).map((f, i)=>field(cm, n, f)).filter((f)=>!!f);
const { text } = cm.lineInfo(n);