Closed missioeric closed 8 years ago
This is a good question because the distinction is a little arcane; consecutive_combination_strategy
doesn't affect ranges, only sequences:
bcv.set_options({consecutive_combination_strategy: "combine"});
bcv.parse("Matthew 5-7").osis(); // Matt.5-Matt.7
bcv.parse("Matthew 5, 6, 7").osis(); // Matt.5-Matt.7
bcv.set_options({consecutive_combination_strategy: "separate"});
bcv.parse("Matthew 5-7").osis(); // Matt.5-Matt.7
bcv.parse("Matthew 5, 6, 7").osis(); // Matt.5,Matt.6,Matt.7
The sequence_combination_strategy
controls whether the results are returned as an array of osis references or as a comma-delimited string, which I don't think is related to your question.
If you're looking to separate a range into its component parts, you may want to see issue #6.
Ok, thanks for the clarification.
When I run the following code, the "separate" option doesn't work. It shows up as "combine" instead:
var bcv = new bcv_parser; var verses; var parsed_verses; bcv.include_apocrypha(true); bcv.set_options({ "osis_compaction_strategy": "bc", "consecutive_combination_strategy": "separate", "book_sequence_strategy": "ignore", "invalid_sequence_strategy": "ignore", "sequence_combination_strategy": "combine"}); verses = document.getElementById("dcycle_verse_list").value; parsed_verses = bcv.parse(verses).osis()
If I enter Matt 5-7, parsed_verses will equal Matt.5-Matt.7