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 CHANGED
@@ -3115,8 +3115,10 @@ var validateOlink = (element) => {
3115
3115
  if (isDeletedElement(element)) {
3116
3116
  return errors;
3117
3117
  }
3118
- const text = retrieveTextIgnoringNodesWithSelector(element).trim();
3119
- if (ORCID_PATTERN.test(text)) {
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).trim();
3039
- if (ORCID_PATTERN.test(text)) {
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, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pro-editor-schema",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Pro Editor XML schemas",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",