This repository was archived by the owner on Nov 13, 2022. It is now read-only.
Commit 9b1cc82 1 parent 3074ebb commit 9b1cc82 Copy full SHA for 9b1cc82
File tree 13 files changed +121
-112
lines changed
13 files changed +121
-112
lines changed Original file line number Diff line number Diff line change 2
2
3
3
- Fixed the return types on the validators from ` Boolean ` to ` boolean ` .
4
4
- The TypeScript target is now ` ES2019 ` , because ` es6 ` does not support the ` Array.prototype.includes() ` -method we were using.
5
+ - Improve error message (@tobiasdiez ).
5
6
6
7
# 1.2.1
7
8
Original file line number Diff line number Diff line change 1
1
import { validateCitationID } from './util/validator' ;
2
2
import { extractCitations } from './util/extract-citations' ;
3
3
export declare const util : {
4
- ' validateCitationID' : typeof validateCitationID ;
5
- ' extractCitations' : typeof extractCitations ;
4
+ validateCitationID : typeof validateCitationID ;
5
+ extractCitations : typeof extractCitations ;
6
6
} ;
7
7
interface Citation {
8
8
prefix : string ;
Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3
+ exports . makeCitation = exports . parseSingle = exports . util = void 0 ;
3
4
const validator_1 = require ( "./util/validator" ) ;
4
5
const regex_1 = require ( "./util/regex" ) ;
5
6
const retrieve_locator_1 = require ( "./util/retrieve-locator" ) ;
Original file line number Diff line number Diff line change 1
1
export declare const de : {
2
- " Buch" : string ;
3
- " Bücher" : string ;
4
- " Kapitel" : string ;
5
- " Spalte" : string ;
6
- " Spalten" : string ;
7
- " Abbildung" : string ;
8
- " Abbildungen" : string ;
9
- " Blatt" : string ;
10
- " Blätter" : string ;
11
- " Nummer" : string ;
12
- " Nummern" : string ;
13
- " Zeile" : string ;
14
- " Zeilen" : string ;
15
- " Note" : string ;
16
- " Noten" : string ;
17
- " Opus" : string ;
18
- " Opera" : string ;
19
- " Seite" : string ;
20
- " Seiten" : string ;
21
- " Absatz" : string ;
22
- " Absätze" : string ;
23
- " Teil" : string ;
24
- " Teile" : string ;
25
- " Abschnitt" : string ;
26
- " Abschnitte" : string ;
2
+ Buch : string ;
3
+ Bücher : string ;
4
+ Kapitel : string ;
5
+ Spalte : string ;
6
+ Spalten : string ;
7
+ Abbildung : string ;
8
+ Abbildungen : string ;
9
+ Blatt : string ;
10
+ Blätter : string ;
11
+ Nummer : string ;
12
+ Nummern : string ;
13
+ Zeile : string ;
14
+ Zeilen : string ;
15
+ Note : string ;
16
+ Noten : string ;
17
+ Opus : string ;
18
+ Opera : string ;
19
+ Seite : string ;
20
+ Seiten : string ;
21
+ Absatz : string ;
22
+ Absätze : string ;
23
+ Teil : string ;
24
+ Teile : string ;
25
+ Abschnitt : string ;
26
+ Abschnitte : string ;
27
27
"sub verbo" : string ;
28
28
"sub verbis" : string ;
29
- " Vers" : string ;
30
- " Verse" : string ;
31
- " Band" : string ;
32
- " Bände" : string ;
29
+ Vers : string ;
30
+ Verse : string ;
31
+ Band : string ;
32
+ Bände : string ;
33
33
"B." : string ;
34
34
"Kap." : string ;
35
35
"Sp." : string ;
@@ -47,8 +47,8 @@ export declare const de: {
47
47
"V." : string ;
48
48
"Bd." : string ;
49
49
"Bde." : string ;
50
- "¶ " : string ;
51
- "¶¶ " : string ;
52
- "§ " : string ;
53
- "§§ " : string ;
50
+ "\u00B6 " : string ;
51
+ "\u00B6\u00B6 " : string ;
52
+ "\u00A7 " : string ;
53
+ "\u00A7\u00A7 " : string ;
54
54
} ;
Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3
+ exports . de = void 0 ;
3
4
exports . de = {
4
5
"Buch" : "book" ,
5
6
"Bücher" : "book" ,
Original file line number Diff line number Diff line change 1
1
export declare const en : {
2
- " book" : string ;
3
- " books" : string ;
4
- " chapter" : string ;
5
- " chapters" : string ;
6
- " column" : string ;
7
- " columns" : string ;
8
- " figure" : string ;
9
- " figures" : string ;
10
- " folio" : string ;
11
- " folios" : string ;
12
- " number" : string ;
13
- " numbers" : string ;
14
- " line" : string ;
15
- " lines" : string ;
16
- " note" : string ;
17
- " notes" : string ;
18
- " opus" : string ;
19
- " opera" : string ;
20
- " page" : string ;
21
- " pages" : string ;
22
- " paragraph" : string ;
23
- " paragraphs" : string ;
24
- " part" : string ;
25
- " parts" : string ;
26
- " section" : string ;
27
- " sections" : string ;
2
+ book : string ;
3
+ books : string ;
4
+ chapter : string ;
5
+ chapters : string ;
6
+ column : string ;
7
+ columns : string ;
8
+ figure : string ;
9
+ figures : string ;
10
+ folio : string ;
11
+ folios : string ;
12
+ number : string ;
13
+ numbers : string ;
14
+ line : string ;
15
+ lines : string ;
16
+ note : string ;
17
+ notes : string ;
18
+ opus : string ;
19
+ opera : string ;
20
+ page : string ;
21
+ pages : string ;
22
+ paragraph : string ;
23
+ paragraphs : string ;
24
+ part : string ;
25
+ parts : string ;
26
+ section : string ;
27
+ sections : string ;
28
28
"sub verbo" : string ;
29
29
"sub verbis" : string ;
30
- " verse" : string ;
31
- " verses" : string ;
32
- " volume" : string ;
33
- " volumes" : string ;
30
+ verse : string ;
31
+ verses : string ;
32
+ volume : string ;
33
+ volumes : string ;
34
34
"bk." : string ;
35
- " bks" : string ;
35
+ bks : string ;
36
36
"chap." : string ;
37
- " chaps" : string ;
37
+ chaps : string ;
38
38
"col." : string ;
39
- " cols" : string ;
39
+ cols : string ;
40
40
"fig." : string ;
41
- " figs" : string ;
41
+ figs : string ;
42
42
"fol." : string ;
43
- " fols" : string ;
43
+ fols : string ;
44
44
"no." : string ;
45
45
"nos." : string ;
46
46
"l." : string ;
@@ -52,19 +52,19 @@ export declare const en: {
52
52
"p." : string ;
53
53
"pp." : string ;
54
54
"para." : string ;
55
- " paras" : string ;
55
+ paras : string ;
56
56
"pt." : string ;
57
- " pts" : string ;
57
+ pts : string ;
58
58
"sec." : string ;
59
- " secs" : string ;
59
+ secs : string ;
60
60
"s.v." : string ;
61
61
"s.vv." : string ;
62
62
"v." : string ;
63
63
"vv." : string ;
64
64
"vol." : string ;
65
- " vols" : string ;
66
- "¶ " : string ;
67
- "¶¶ " : string ;
68
- "§ " : string ;
69
- "§§ " : string ;
65
+ vols : string ;
66
+ "\u00B6 " : string ;
67
+ "\u00B6\u00B6 " : string ;
68
+ "\u00A7 " : string ;
69
+ "\u00A7\u00A7 " : string ;
70
70
} ;
Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3
+ exports . en = void 0 ;
3
4
exports . en = {
4
5
"book" : "book" ,
5
6
"books" : "book" ,
Original file line number Diff line number Diff line change 1
1
export declare const fr : {
2
- " livre" : string ;
3
- " livres" : string ;
4
- " chapitre" : string ;
5
- " chapitres" : string ;
6
- " colonne" : string ;
7
- " colonnes" : string ;
8
- " figure" : string ;
9
- " figures" : string ;
10
- " folio" : string ;
11
- " folios" : string ;
12
- " numéro" : string ;
13
- " numéros" : string ;
14
- " ligne" : string ;
15
- " lignes" : string ;
16
- " note" : string ;
17
- " notes" : string ;
18
- " opus" : string ;
19
- " page" : string ;
20
- " pages" : string ;
21
- " paragraphe" : string ;
22
- " paragraphes" : string ;
23
- " partie" : string ;
24
- " parties" : string ;
25
- " section" : string ;
26
- " sections" : string ;
2
+ livre : string ;
3
+ livres : string ;
4
+ chapitre : string ;
5
+ chapitres : string ;
6
+ colonne : string ;
7
+ colonnes : string ;
8
+ figure : string ;
9
+ figures : string ;
10
+ folio : string ;
11
+ folios : string ;
12
+ numéro : string ;
13
+ numéros : string ;
14
+ ligne : string ;
15
+ lignes : string ;
16
+ note : string ;
17
+ notes : string ;
18
+ opus : string ;
19
+ page : string ;
20
+ pages : string ;
21
+ paragraphe : string ;
22
+ paragraphes : string ;
23
+ partie : string ;
24
+ parties : string ;
25
+ section : string ;
26
+ sections : string ;
27
27
"sub verbo" : string ;
28
28
"sub verbis" : string ;
29
- " verset" : string ;
30
- " versets" : string ;
31
- " volume" : string ;
32
- " volumes" : string ;
29
+ verset : string ;
30
+ versets : string ;
31
+ volume : string ;
32
+ volumes : string ;
33
33
"liv." : string ;
34
34
"chap." : string ;
35
35
"col." : string ;
36
36
"fig." : string ;
37
- "fᵒ" : string ;
38
- " fᵒˢ" : string ;
39
- "nᵒ" : string ;
40
- " nᵒˢ" : string ;
37
+ fᵒ : string ;
38
+ fᵒˢ : string ;
39
+ nᵒ : string ;
40
+ nᵒˢ : string ;
41
41
"l." : string ;
42
42
"n." : string ;
43
43
"op." : string ;
@@ -49,5 +49,5 @@ export declare const fr: {
49
49
"s. vv." : string ;
50
50
"v." : string ;
51
51
"vol." : string ;
52
- "§ " : string ;
52
+ "\u00A7 " : string ;
53
53
} ;
Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3
+ exports . fr = void 0 ;
3
4
exports . fr = {
4
5
"livre" : "book" ,
5
6
"livres" : "book" ,
Original file line number Diff line number Diff line change 12
12
* END HEADER
13
13
*/
14
14
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
15
+ exports . extractCitations = void 0 ;
15
16
const validator_1 = require ( "./validator" ) ;
16
17
const regex_1 = require ( "./regex" ) ;
17
18
function extractCitations ( file , strict = false ) {
Original file line number Diff line number Diff line change 13
13
* END HEADER
14
14
*/
15
15
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
16
+ exports . locatorRE = exports . looseCitekeyValidatorRE = exports . strictCitekeyValidatorRE = exports . citationExtractionRE = exports . fullCitationValidatorRE = void 0 ;
16
17
exports . fullCitationValidatorRE = / ^ \[ ( [ ^ [ \] ] * @ [ ^ [ \] ] + ) \] $ / ;
17
18
exports . citationExtractionRE = / ( \[ ( [ ^ [ \] ] * @ [ ^ [ \] ] + ) \] ) | ( @ [ \p{ L} \d _ ] [ \p{ L} \d _ : . # $ % & \- + ? < > ~ \/ ] * ) / gu;
18
19
exports . strictCitekeyValidatorRE = / ^ @ ? ( [ a - z A - Z 0 - 9 _ ] [ a - z A - Z 0 - 9 _ : . # $ % & \- + ? < > ~ / ] * ) $ / ;
Original file line number Diff line number Diff line change 14
14
* END HEADER
15
15
*/
16
16
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
17
+ exports . extractLocator = void 0 ;
17
18
const regex_1 = require ( "../util/regex" ) ;
18
19
const en_1 = require ( "../data/en" ) ;
19
20
const de_1 = require ( "../data/de" ) ;
Original file line number Diff line number Diff line change 12
12
* END HEADER
13
13
*/
14
14
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
15
+ exports . validateCitationID = exports . validateCitationPart = exports . validateFullCitation = void 0 ;
15
16
const regex_1 = require ( "./regex" ) ;
16
17
function validateFullCitation ( citation ) {
17
18
return regex_1 . fullCitationValidatorRE . test ( citation ) ;
You can’t perform that action at this time.
0 commit comments