tag-checker 0.0.93 → 0.0.97

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tag-checker",
3
- "version": "0.0.93",
3
+ "version": "0.0.97",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,9 +1,9 @@
1
- const divPosRegex1 = /^(<sutra.+?>\r?\n)?<division.+?>\r?\n<vol.+?>\r?\n<pb/;
1
+ const divPosRegex1 = /^(<sutra.+?>\r?\n)?(<division.+?>\r?\n)+<vol.+?>\r?\n<pb/;
2
2
  const divPosRegex2 = /^<division.+?>\r?\n<vol.+?>\r?\n<pb/;
3
- const volPosRegex1 = /^(<sutra.+?>\r?\n)?<vol.+?>\r?\n<pb/;
3
+ const volPosRegex1 = /^(<sutra.+?>\r?\n)?<vol .+?>\r?\n<pb/;
4
4
  const volPosRegex2 = /^<vol/;
5
5
  const volRegex = /<vol /g;
6
- const divRegex = /<division n="(\d+?)"/g;
6
+ const divRegex = /<division n="([\d.]+?)"/g;
7
7
  const wrongSutraPosRegex = /<sutra[^>]+?>(?!(\r?\n<vol|\r?\n<division|<head n="1"))/g;
8
8
  const volHeadRegex = /<vol.+?>\r?\n<pb.+?>\r?\n(<[A-z]p id.+?>)?<head n="1"/;
9
9
 
@@ -73,7 +73,7 @@ function checkDivOrder(store, lastDivFile, lastDivN, fn, divN) {
73
73
  warn('Division may be missing!', lastDivFile, lastDivN, fn, divN);
74
74
  }
75
75
  else {
76
- store.push('Wrong Division Order' + lastDivFile + ' ' + lastDivN + ' ' + fn + ' ' + divN);
76
+ warn('Wrong Division Order' + lastDivFile + ' ' + lastDivN + ' ' + fn + ' ' + divN);
77
77
  }
78
78
  }
79
79
 
@@ -59,7 +59,7 @@ let tagRules = [
59
59
  },
60
60
  {
61
61
  type: 'division',
62
- correctRegex: new RegExp('<division n="(\\d.+?)(\\.\\d+?)?" t="[^"<>\n]+?"( (bo|en|tw|cn)="[^"<>\n]+?")*?( i18n="' + repo + '-division-\\1")?\\/>', 'g'),
62
+ correctRegex: new RegExp('<division n="(\\d+?)(\\.\\d+?)?" t="[^"<>\n]+?"( (bo|en|tw|cn)="[^"<>\n]+?")*?( i18n="' + repo + '-division-\\d+")?\\/>', 'g'),
63
63
  suspectedRegex: /<division /g,
64
64
  tagNameStrRegex: /division/g,
65
65
  lineWithTagRegex: /^.*?division.*$/mg