diff --git a/js/single_line_picker.js b/js/single_line_picker.js index 20ca2a6..db51483 100644 --- a/js/single_line_picker.js +++ b/js/single_line_picker.js @@ -222,11 +222,13 @@ app.registerExtension({ const texts = text.split('\n'); let lineCount = texts.length; + // read the configuration from the first line if (lineCount > 1 && this.parseConfig(texts[0])) { texts.shift(); lineCount--; } + // match the number of elements const needs = lineCount - this.container.childElementCount; if (needs > 0){ for (let index = 0; index < needs; index++) { @@ -238,6 +240,7 @@ app.registerExtension({ } } + // normal, dict for (let index = 0; index < lineCount; index++) { const div = this.container.children[index]; let realText = texts[index];