Skip to content

Commit 3354286

Browse files
authored
Merge pull request #2 from usetrmnl/ucffool-option-indents
Import fix for excess indentation on options
2 parents 0476770 + 9f23631 commit 3354286

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

trmnl-form-builder.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,10 +2058,10 @@ class TRMLYamlForm extends HTMLElement {
20582058
}
20592059
}
20602060

2061-
// 5. Top-Level Array items (Exactly 2 spaces + dash)
2062-
// Regex changed from {2,} to {2} to avoid eating nested items
2063-
else if (line.match(/^\s{2}-\s+/)) {
2064-
const value = line.replace(/^\s{2}-\s+/, '').trim();
2061+
// 5. Top-Level Array items (2 or more spaces + dash)
2062+
// But we've already handled conditional nested items above with a more specific check
2063+
else if (line.match(/^\s{2,}-\s+/)) {
2064+
const value = line.replace(/^\s{2,}-\s+/, '').trim();
20652065

20662066
// If we're in conditional_validation, this is a NEW condition object
20672067
if (currentArrayKey === 'conditional_validation') {
@@ -2169,3 +2169,4 @@ class TRMLYamlForm extends HTMLElement {
21692169
customElements.define('trmnl-form-builder', TRMLYamlForm);
21702170

21712171

2172+

0 commit comments

Comments
 (0)