pro-editor-schema 1.2.1 → 1.2.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.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3115,8 +3115,10 @@ var validateOlink = (element) => {
|
|
|
3115
3115
|
if (isDeletedElement(element)) {
|
|
3116
3116
|
return errors;
|
|
3117
3117
|
}
|
|
3118
|
-
const text = retrieveTextIgnoringNodesWithSelector(element)
|
|
3119
|
-
|
|
3118
|
+
const text = retrieveTextIgnoringNodesWithSelector(element);
|
|
3119
|
+
const isEmpty = text.length === 0;
|
|
3120
|
+
const isValidOrcid = ORCID_PATTERN.test(text);
|
|
3121
|
+
if (isEmpty || isValidOrcid) {
|
|
3120
3122
|
return errors;
|
|
3121
3123
|
}
|
|
3122
3124
|
addValidationIssue(errors, {
|
package/dist/index.mjs
CHANGED
|
@@ -3035,8 +3035,10 @@ var validateOlink = (element) => {
|
|
|
3035
3035
|
if (isDeletedElement(element)) {
|
|
3036
3036
|
return errors;
|
|
3037
3037
|
}
|
|
3038
|
-
const text = retrieveTextIgnoringNodesWithSelector(element)
|
|
3039
|
-
|
|
3038
|
+
const text = retrieveTextIgnoringNodesWithSelector(element);
|
|
3039
|
+
const isEmpty = text.length === 0;
|
|
3040
|
+
const isValidOrcid = ORCID_PATTERN.test(text);
|
|
3041
|
+
if (isEmpty || isValidOrcid) {
|
|
3040
3042
|
return errors;
|
|
3041
3043
|
}
|
|
3042
3044
|
addValidationIssue(errors, {
|