node-sword-interface 1.0.11 → 1.0.13
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/API.md
CHANGED
|
@@ -634,6 +634,7 @@ An object representation of a SWORD module.
|
|
|
634
634
|
| distributionLicense | <code>String</code> | The distribution license of the SWORD module |
|
|
635
635
|
| shortCopyright | <code>String</code> | The short copyright information of the SWORD module |
|
|
636
636
|
| version | <code>String</code> | The version of the SWORD module |
|
|
637
|
+
| lastUpdate | <code>String</code> | The date of the last version update of the SWORD module |
|
|
637
638
|
| repository | <code>String</code> | The repository of the SWORD module (only returned by methods interacting with module repositories) |
|
|
638
639
|
| about | <code>String</code> | Extended description of the SWORD module |
|
|
639
640
|
| abbreviation | <code>String</code> | The abbreviation of the SWORD module |
|
package/index.js
CHANGED
|
@@ -42,6 +42,7 @@ const nodeSwordInterfaceModule = require('./build/Release/node_sword_interface.n
|
|
|
42
42
|
* @property {String} distributionLicense - The distribution license of the SWORD module
|
|
43
43
|
* @property {String} shortCopyright - The short copyright information of the SWORD module
|
|
44
44
|
* @property {String} version - The version of the SWORD module
|
|
45
|
+
* @property {String} lastUpdate - The date of the last version update of the SWORD module
|
|
45
46
|
* @property {String} repository - The repository of the SWORD module (only returned by methods interacting with module repositories)
|
|
46
47
|
* @property {String} about - Extended description of the SWORD module
|
|
47
48
|
* @property {String} abbreviation - The abbreviation of the SWORD module
|
package/package.json
CHANGED
|
@@ -71,6 +71,12 @@ void NapiSwordHelper::swordModuleToNapiObject(const Napi::Env& env, SWModule* sw
|
|
|
71
71
|
object["shortCopyright"] = this->getConfigEntry(swModule, "ShortCopyright", env);
|
|
72
72
|
object["version"] = this->getConfigEntry(swModule, "Version", env);
|
|
73
73
|
|
|
74
|
+
if (swModule->getConfigEntry("SwordVersionDate")) {
|
|
75
|
+
object["lastUpdate"] = this->getConfigEntry(swModule, "SwordVersionDate", env);
|
|
76
|
+
} else {
|
|
77
|
+
object["lastUpdate"] = "";
|
|
78
|
+
}
|
|
79
|
+
|
|
74
80
|
if (swModule->getConfigEntry("Direction")) {
|
|
75
81
|
string direction = string(swModule->getConfigEntry("Direction"));
|
|
76
82
|
object["isRightToLeft"] = Napi::Boolean::New(env, (direction == "RtoL"));
|
|
@@ -85,6 +85,7 @@ string TextProcessor::getFilteredText(const string& text, int chapter, int verse
|
|
|
85
85
|
static string itemStartElement = "<item";
|
|
86
86
|
static string itemEndElement = "</item>";
|
|
87
87
|
static string hiBold = "<hi type=\"bold";
|
|
88
|
+
static string hiItalic = "<hi type=\"italic";
|
|
88
89
|
|
|
89
90
|
static regex milestoneFilter = regex("<milestone.*?/>");
|
|
90
91
|
static regex segStartElementFilter = regex("<seg.*?>");
|
|
@@ -169,6 +170,7 @@ string TextProcessor::getFilteredText(const string& text, int chapter, int verse
|
|
|
169
170
|
this->findAndReplaceAll(filteredText, itemStartElement, "<li");
|
|
170
171
|
this->findAndReplaceAll(filteredText, itemEndElement, "</li>");
|
|
171
172
|
this->findAndReplaceAll(filteredText, hiBold, "<hi class=\"bold");
|
|
173
|
+
this->findAndReplaceAll(filteredText, hiItalic, "<hi class=\"italic");
|
|
172
174
|
|
|
173
175
|
filteredText = regex_replace(filteredText, selfClosingElement, "<$2 $3></$2>");
|
|
174
176
|
|