proskomma-core 0.10.14 → 0.10.16
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.
- package/README.md +1 -5
- package/dist/index.js +11 -4
- package/dist/index.mjs +11 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
# EXPERIMENTAL
|
|
2
|
-
|
|
3
|
-
DISCLAIMER : if you want the production version please [click on this link](https://github.com/mvahowe/proskomma-js)
|
|
4
|
-
|
|
5
1
|
# proskomma-core
|
|
6
2
|
|
|
7
3
|
A Javascript Implementation of the Proskomma Scripture Processing Model.
|
|
@@ -50,4 +46,4 @@ Method to solve this problem :
|
|
|
50
46
|
* normally it's listed in the link above
|
|
51
47
|
* then replace `false` by `require.resolve('theNameOfTheNeededPackage')`
|
|
52
48
|
|
|
53
|
-
If it doesn't work, I'm afraid you'll have to dig in the webpack documentation for `resolve` : https://webpack.js.org/configuration/resolve/ (or try to find a solution on StackOverflow !)
|
|
49
|
+
If it doesn't work, I'm afraid you'll have to dig in the webpack documentation for `resolve` : https://webpack.js.org/configuration/resolve/ (or try to find a solution on StackOverflow !)
|
package/dist/index.js
CHANGED
|
@@ -15992,7 +15992,7 @@ var bitset = { exports: {} };
|
|
|
15992
15992
|
var bitsetExports = bitset.exports;
|
|
15993
15993
|
const BitSet = /* @__PURE__ */ getDefaultExportFromCjs(bitsetExports);
|
|
15994
15994
|
const name = "proskomma-core";
|
|
15995
|
-
const version = "0.10.
|
|
15995
|
+
const version = "0.10.16";
|
|
15996
15996
|
const description$b = "A Scripture Runtime Engine";
|
|
15997
15997
|
const files = [
|
|
15998
15998
|
"dist"
|
|
@@ -34086,7 +34086,10 @@ const makeVerses = (subclass, matchedBits) => {
|
|
|
34086
34086
|
`
|
|
34087
34087
|
};
|
|
34088
34088
|
if (ret.numberString.includes("-")) {
|
|
34089
|
-
|
|
34089
|
+
let [fromV, toV] = ret.numberString.split("-").map((v) => parseInt(v));
|
|
34090
|
+
if (!toV) {
|
|
34091
|
+
toV = fromV;
|
|
34092
|
+
}
|
|
34090
34093
|
ret.numbers = Array.from(Array(toV - fromV + 1).keys()).map(
|
|
34091
34094
|
(v) => v + fromV
|
|
34092
34095
|
);
|
|
@@ -38520,8 +38523,12 @@ const Sequence = class {
|
|
|
38520
38523
|
}
|
|
38521
38524
|
return false;
|
|
38522
38525
|
};
|
|
38526
|
+
const blockGrafts = (blockItems) => {
|
|
38527
|
+
const grafts = blockItems.filter((i) => i.type === "graft" && i.subType === "fig");
|
|
38528
|
+
return grafts.length > 0;
|
|
38529
|
+
};
|
|
38523
38530
|
for (const blockRecord of this.blocks.entries()) {
|
|
38524
|
-
if (blockRecord[1].tokens().length === 0 && !emptyMilestones(blockRecord[1].items) && !canBeEmpty.includes(blockRecord[1].bs.payload)) {
|
|
38531
|
+
if (blockRecord[1].tokens().length === 0 && !emptyMilestones(blockRecord[1].items) && !blockGrafts(blockRecord[1].items) && !canBeEmpty.includes(blockRecord[1].bs.payload)) {
|
|
38525
38532
|
emptyBlocks.push(blockRecord);
|
|
38526
38533
|
}
|
|
38527
38534
|
}
|
|
@@ -39797,7 +39804,7 @@ const Parser2 = class {
|
|
|
39797
39804
|
if (seq.type === "sidebar") {
|
|
39798
39805
|
this.substituteEsbCatScopes(seq);
|
|
39799
39806
|
}
|
|
39800
|
-
if (["footnote", "xref"].includes(seq.type)) {
|
|
39807
|
+
if (["footnote", "xref", "fig"].includes(seq.type)) {
|
|
39801
39808
|
seq.lastBlock().inlineToEnd();
|
|
39802
39809
|
}
|
|
39803
39810
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -15990,7 +15990,7 @@ var bitset = { exports: {} };
|
|
|
15990
15990
|
var bitsetExports = bitset.exports;
|
|
15991
15991
|
const BitSet = /* @__PURE__ */ getDefaultExportFromCjs(bitsetExports);
|
|
15992
15992
|
const name = "proskomma-core";
|
|
15993
|
-
const version = "0.10.
|
|
15993
|
+
const version = "0.10.16";
|
|
15994
15994
|
const description$b = "A Scripture Runtime Engine";
|
|
15995
15995
|
const files = [
|
|
15996
15996
|
"dist"
|
|
@@ -34084,7 +34084,10 @@ const makeVerses = (subclass, matchedBits) => {
|
|
|
34084
34084
|
`
|
|
34085
34085
|
};
|
|
34086
34086
|
if (ret.numberString.includes("-")) {
|
|
34087
|
-
|
|
34087
|
+
let [fromV, toV] = ret.numberString.split("-").map((v) => parseInt(v));
|
|
34088
|
+
if (!toV) {
|
|
34089
|
+
toV = fromV;
|
|
34090
|
+
}
|
|
34088
34091
|
ret.numbers = Array.from(Array(toV - fromV + 1).keys()).map(
|
|
34089
34092
|
(v) => v + fromV
|
|
34090
34093
|
);
|
|
@@ -38518,8 +38521,12 @@ const Sequence = class {
|
|
|
38518
38521
|
}
|
|
38519
38522
|
return false;
|
|
38520
38523
|
};
|
|
38524
|
+
const blockGrafts = (blockItems) => {
|
|
38525
|
+
const grafts = blockItems.filter((i) => i.type === "graft" && i.subType === "fig");
|
|
38526
|
+
return grafts.length > 0;
|
|
38527
|
+
};
|
|
38521
38528
|
for (const blockRecord of this.blocks.entries()) {
|
|
38522
|
-
if (blockRecord[1].tokens().length === 0 && !emptyMilestones(blockRecord[1].items) && !canBeEmpty.includes(blockRecord[1].bs.payload)) {
|
|
38529
|
+
if (blockRecord[1].tokens().length === 0 && !emptyMilestones(blockRecord[1].items) && !blockGrafts(blockRecord[1].items) && !canBeEmpty.includes(blockRecord[1].bs.payload)) {
|
|
38523
38530
|
emptyBlocks.push(blockRecord);
|
|
38524
38531
|
}
|
|
38525
38532
|
}
|
|
@@ -39795,7 +39802,7 @@ const Parser2 = class {
|
|
|
39795
39802
|
if (seq.type === "sidebar") {
|
|
39796
39803
|
this.substituteEsbCatScopes(seq);
|
|
39797
39804
|
}
|
|
39798
|
-
if (["footnote", "xref"].includes(seq.type)) {
|
|
39805
|
+
if (["footnote", "xref", "fig"].includes(seq.type)) {
|
|
39799
39806
|
seq.lastBlock().inlineToEnd();
|
|
39800
39807
|
}
|
|
39801
39808
|
}
|