@unfoldingword/door43-preview-renderers 1.5.1 → 1.5.2
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/dist/index.esm.js +5 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -92125,6 +92125,11 @@ function decorateBibleBookHtml(html, bookId) {
|
|
|
92125
92125
|
content = content.replace(/<p /i, "<p id=\"nav-".concat(bookId, "\" "));
|
|
92126
92126
|
content = content.replaceAll(/<span id="chapter-(\d+)-verse-(\d+)"([^>]*)>(\d+)<\/span>/g, "<span id=\"nav-".concat(bookId, "-$1-$2\"$3><a href=\"#nav-").concat(bookId, "-$1-$2\" class=\"header-link\">$4</a></span>"));
|
|
92127
92127
|
content = content.replaceAll(/<span id="chapter-(\d+)"([^>]+)>([\d]+)<\/span>/gi, "<span id=\"nav-".concat(bookId, "-$1\"").concat(showChapters ? " data-toc-title=\"".concat(escapeHtml$5(titleText), " $1\"") : '', "$2><a href=\"#nav-").concat(bookId, "-$1-1\" class=\"header-link\">$3</a></span>"));
|
|
92128
|
+
|
|
92129
|
+
// Anchor the descriptive title (\d — e.g. a Psalm superscription) as a "front"
|
|
92130
|
+
// verse so it is navigable at <abbr>-<book>-<chapter>-front. The \d paragraph
|
|
92131
|
+
// follows \c, so it carries the chapter label span; take the chapter from it.
|
|
92132
|
+
content = content.replace(new RegExp("<p class=\"paras_usfm_d\">(\\s*<span id=\"nav-".concat(bookId, "-(\\d+)\")"), 'g'), "<p class=\"paras_usfm_d\" id=\"nav-".concat(bookId, "-$2-front\">$1"));
|
|
92128
92133
|
content = content.replace(/<span([^>]+style="[^">]+#CCC[^">]+")/gi, '<span$1 class="footnote"');
|
|
92129
92134
|
content = content.replace(/[\u00A0\u202F\u2009 ]+/g, ' ');
|
|
92130
92135
|
content = content.replace(/(\d{1,3})(?:\s*,\s*\d{3})+\b/g, function (match) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unfoldingword/door43-preview-renderers",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "JavaScript library for gathering content from various repositories and rendering HTML snippets for web previews and PDFs",
|
|
6
6
|
"main": "dist/index.esm.js",
|