Description
The analysis.duplicateFieldsetEntryName
error seems to conflict with enojs's documentation and API.
Duplicate entries in fieldsets currently always errors out with no way to disable this behavior:
enojs/lib/parse_steps/analyze.js
Lines 136 to 141 in a251ce1
But Fieldset.elements()
would be able to give useful data from its entries if this was allowed to parse, and this example is given as the primary reason for using elements
in its documentation:
dialogue:
alice = hi
bob = hey
alice = sup?
bob = nothin'
I think a good compromise would be to start by adding an option that controls for the whole parse whether duplicates error, and perhaps down the line some sort of specification scheme could be added so duplicates can error by default, but selectively can be used.
Alternatively / also, it might be useful in those cases to have entries_associative
use array values that are appended to when parsing, so element
could error on duplicate elements while normally retrieving the head of the list, but an element_multi
method could easily pull out properly ordered values for fieldsets with mostly singular elements but some plural cases.