bible-ref-parse 3.1.2 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1568,107 +1568,6 @@
1568
1568
  return this.range(passage, accum, context);
1569
1569
  }
1570
1570
 
1571
- // Handle verse ranges when in chapter context (e.g., "Sacharja 3, 1-4" = verses 1-4 in chapter 3).
1572
- cv_range(passage, accum, context) {
1573
- var book, book_id, end_v, id, ref, start_v;
1574
- passage.start_context = bcv_utils.shallow_clone(context);
1575
- // We don't need to preserve the original `type` for reparsing.
1576
- passage.type = "range";
1577
- [start_v, end_v] = passage.value;
1578
- // Create a virtual BCV range using the current chapter context
1579
- // We need to use the book ID that matches the context, not the book name
1580
- book_id = null;
1581
- ref = this.books;
1582
- for (id in ref) {
1583
- book = ref[id];
1584
- if (book.parsed.indexOf(context.b) >= 0) {
1585
- book_id = id;
1586
- break;
1587
- }
1588
- }
1589
- passage.value = [
1590
- {
1591
- type: "bcv",
1592
- value: [
1593
- {
1594
- type: "bc",
1595
- value: [
1596
- {
1597
- type: "b",
1598
- value: book_id,
1599
- indices: passage.indices
1600
- },
1601
- {
1602
- type: "c",
1603
- value: [
1604
- {
1605
- type: "integer",
1606
- value: context.c,
1607
- indices: passage.indices
1608
- }
1609
- ],
1610
- indices: passage.indices
1611
- }
1612
- ],
1613
- indices: passage.indices
1614
- },
1615
- start_v
1616
- ],
1617
- indices: passage.indices
1618
- },
1619
- end_v
1620
- ];
1621
- return this.range(passage, accum, context);
1622
- }
1623
-
1624
- // Handle book-chapter followed by verse range (e.g., "Sacharja 3, 1-4" = verses 1-4 in chapter 3).
1625
- bc_cv_range(passage, accum, context) {
1626
- var b, bc, c, cv_range, end_v, start_v;
1627
- passage.start_context = bcv_utils.shallow_clone(context);
1628
- // We don't need to preserve the original `type` for reparsing.
1629
- passage.type = "range";
1630
- [bc, cv_range] = passage.value;
1631
- // Extract the book and chapter from the bc
1632
- b = this.pluck("b", bc.value).value;
1633
- c = this.pluck("c", bc.value).value;
1634
- // Extract the verse range from cv_range
1635
- [start_v, end_v] = cv_range.value;
1636
- // Create a virtual BCV range
1637
- passage.value = [
1638
- {
1639
- type: "bcv",
1640
- value: [
1641
- {
1642
- type: "bc",
1643
- value: [
1644
- {
1645
- type: "b",
1646
- value: b,
1647
- indices: passage.indices
1648
- },
1649
- {
1650
- type: "c",
1651
- value: [
1652
- {
1653
- type: "integer",
1654
- value: c,
1655
- indices: passage.indices
1656
- }
1657
- ],
1658
- indices: passage.indices
1659
- }
1660
- ],
1661
- indices: passage.indices
1662
- },
1663
- start_v
1664
- ],
1665
- indices: passage.indices
1666
- },
1667
- end_v
1668
- ];
1669
- return this.range(passage, accum, context);
1670
- }
1671
-
1672
1571
  // Use an object to establish context for later objects but don't otherwise use it.
1673
1572
  context(passage, accum, context) {
1674
1573
  var key, ref;
@@ -3365,7 +3264,7 @@
3365
3264
  },
3366
3265
  {
3367
3266
  osis: ["Joel"],
3368
- regexp: RegExp(`(^|${bcv_parser.prototype.regexps.pre_book})((?:Јои[лљ]|Joel))(?:(?=[\\d\\s\\xa0.:,;\\x1e\\x1f&\\(\\)\\uff08\\uff09\\[\\]/"'\\*=~\\-\\u2013\\u2014])|$)`,
3267
+ regexp: RegExp(`(^|${bcv_parser.prototype.regexps.pre_book})((?:Јои(?:ло?|љ)|Joel))(?:(?=[\\d\\s\\xa0.:,;\\x1e\\x1f&\\(\\)\\uff08\\uff09\\[\\]/"'\\*=~\\-\\u2013\\u2014])|$)`,
3369
3268
  "gi")
3370
3269
  },
3371
3270
  {