tag-checker 0.0.101 → 0.0.102

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.101",
3
+ "version": "0.0.102",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/analyzeTag.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const volAnalyzeRegex = /<vol n="((\d+?)(-(\d+?))?)"/;
2
2
  const sutraRegex = /<sutra id="[\da-zA-Z]*?[a-zA-Z]((\d+?)([a-zA-Z])?)"/;
3
- const headAnalyzeRegex = /<head n="(\d+?)" (t|bo|tw|en|cn)="(.+?)"/;
3
+ const headAnalyzeRegex = /<head( n="(\d+?)"| (t|bo|tw|en|cn)="(.+?)")/;
4
4
  const bampoRegex = /<bampo n="((\d+?)([a-zA-Z])?)\.(\d+?)"/;
5
5
  const pb4AnalyzeRegex = /<pb id="((\d+?)(-(\d+?))?)-((\d+?)([abcd]))"/;
6
6
  const pbAnalyzeRegex = /<pb id="((\d+?)(-(\d+?))?)-(\d+?)"/;
@@ -31,13 +31,14 @@ export function analyzeSutra(fn, pb, tag) {
31
31
 
32
32
  export function analyzeHead(fn, pb, tag) {
33
33
  let headBio = headAnalyzeRegex.exec(tag);
34
+
34
35
  return {
35
36
  type: 'head',
36
37
  fn: fn,
37
38
  pb: pb,
38
39
  tag: headBio[0],
39
- headN: Number(headBio[1]),
40
- tName: headBio[2]
40
+ headN: Number(headBio[2]),
41
+ tName: headBio[4]
41
42
  };
42
43
  }
43
44