Themes: don't inline text fields if they don't have text around them
This commit is contained in:
parent
0c1b5d1b6c
commit
821ddcfaca
1 changed files with 7 additions and 0 deletions
|
@ -541,6 +541,13 @@ class DetectInline extends DesugaringStep<QuestionableTagRenderingConfigJson> {
|
|||
context.err("'freeform' is a string, but should be an object")
|
||||
return json
|
||||
}
|
||||
|
||||
if(!Object.values(json.render).some(render => render !== "{"+json.freeform.key+"}")){
|
||||
// We only render the current value, without anything more. Not worth inlining
|
||||
return json
|
||||
}
|
||||
|
||||
|
||||
json.freeform.inline ??= true
|
||||
return json
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue