@promptbook/markdown-utils 0.74.0-7 → 0.74.0-8
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/esm/index.es.js +7 -5
- package/esm/index.es.js.map +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +7 -5
- package/umd/index.umd.js.map +1 -1
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.74.0-
|
|
25
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.74.0-7';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
*/
|
|
@@ -4283,10 +4283,12 @@
|
|
|
4283
4283
|
* @public exported from `@promptbook/utils`
|
|
4284
4284
|
*/
|
|
4285
4285
|
function countPages(text) {
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4286
|
+
if (text === '') {
|
|
4287
|
+
return 0;
|
|
4288
|
+
}
|
|
4289
|
+
var pagesByLinesCount = Math.ceil(countLines(text) / 44);
|
|
4290
|
+
var pagesByCharactersCount = Math.ceil(countCharacters(text) / 2772);
|
|
4291
|
+
return Math.max(pagesByLinesCount, pagesByCharactersCount);
|
|
4290
4292
|
}
|
|
4291
4293
|
|
|
4292
4294
|
/**
|