Skip to content
This repository has been archived by the owner on Nov 13, 2022. It is now read-only.

Commit

Permalink
Re-build distribution, fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanlesage committed Jan 23, 2021
1 parent 3074ebb commit 9b1cc82
Show file tree
Hide file tree
Showing 13 changed files with 121 additions and 112 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Fixed the return types on the validators from `Boolean` to `boolean`.
- The TypeScript target is now `ES2019`, because `es6` does not support the `Array.prototype.includes()`-method we were using.
- Improve error message (@tobiasdiez).

# 1.2.1

Expand Down
4 changes: 2 additions & 2 deletions dist/citr.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { validateCitationID } from './util/validator';
import { extractCitations } from './util/extract-citations';
export declare const util: {
'validateCitationID': typeof validateCitationID;
'extractCitations': typeof extractCitations;
validateCitationID: typeof validateCitationID;
extractCitations: typeof extractCitations;
};
interface Citation {
prefix: string;
Expand Down
1 change: 1 addition & 0 deletions dist/citr.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeCitation = exports.parseSingle = exports.util = void 0;
const validator_1 = require("./util/validator");
const regex_1 = require("./util/regex");
const retrieve_locator_1 = require("./util/retrieve-locator");
Expand Down
66 changes: 33 additions & 33 deletions dist/data/de.d.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
export declare const de: {
"Buch": string;
"Bücher": string;
"Kapitel": string;
"Spalte": string;
"Spalten": string;
"Abbildung": string;
"Abbildungen": string;
"Blatt": string;
"Blätter": string;
"Nummer": string;
"Nummern": string;
"Zeile": string;
"Zeilen": string;
"Note": string;
"Noten": string;
"Opus": string;
"Opera": string;
"Seite": string;
"Seiten": string;
"Absatz": string;
"Absätze": string;
"Teil": string;
"Teile": string;
"Abschnitt": string;
"Abschnitte": string;
Buch: string;
Bücher: string;
Kapitel: string;
Spalte: string;
Spalten: string;
Abbildung: string;
Abbildungen: string;
Blatt: string;
Blätter: string;
Nummer: string;
Nummern: string;
Zeile: string;
Zeilen: string;
Note: string;
Noten: string;
Opus: string;
Opera: string;
Seite: string;
Seiten: string;
Absatz: string;
Absätze: string;
Teil: string;
Teile: string;
Abschnitt: string;
Abschnitte: string;
"sub verbo": string;
"sub verbis": string;
"Vers": string;
"Verse": string;
"Band": string;
"Bände": string;
Vers: string;
Verse: string;
Band: string;
Bände: string;
"B.": string;
"Kap.": string;
"Sp.": string;
Expand All @@ -47,8 +47,8 @@ export declare const de: {
"V.": string;
"Bd.": string;
"Bde.": string;
"": string;
"¶¶": string;
"§": string;
"§§": string;
"\u00B6": string;
"\u00B6\u00B6": string;
"\u00A7": string;
"\u00A7\u00A7": string;
};
1 change: 1 addition & 0 deletions dist/data/de.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.de = void 0;
exports.de = {
"Buch": "book",
"Bücher": "book",
Expand Down
86 changes: 43 additions & 43 deletions dist/data/en.d.ts
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
export declare const en: {
"book": string;
"books": string;
"chapter": string;
"chapters": string;
"column": string;
"columns": string;
"figure": string;
"figures": string;
"folio": string;
"folios": string;
"number": string;
"numbers": string;
"line": string;
"lines": string;
"note": string;
"notes": string;
"opus": string;
"opera": string;
"page": string;
"pages": string;
"paragraph": string;
"paragraphs": string;
"part": string;
"parts": string;
"section": string;
"sections": string;
book: string;
books: string;
chapter: string;
chapters: string;
column: string;
columns: string;
figure: string;
figures: string;
folio: string;
folios: string;
number: string;
numbers: string;
line: string;
lines: string;
note: string;
notes: string;
opus: string;
opera: string;
page: string;
pages: string;
paragraph: string;
paragraphs: string;
part: string;
parts: string;
section: string;
sections: string;
"sub verbo": string;
"sub verbis": string;
"verse": string;
"verses": string;
"volume": string;
"volumes": string;
verse: string;
verses: string;
volume: string;
volumes: string;
"bk.": string;
"bks": string;
bks: string;
"chap.": string;
"chaps": string;
chaps: string;
"col.": string;
"cols": string;
cols: string;
"fig.": string;
"figs": string;
figs: string;
"fol.": string;
"fols": string;
fols: string;
"no.": string;
"nos.": string;
"l.": string;
Expand All @@ -52,19 +52,19 @@ export declare const en: {
"p.": string;
"pp.": string;
"para.": string;
"paras": string;
paras: string;
"pt.": string;
"pts": string;
pts: string;
"sec.": string;
"secs": string;
secs: string;
"s.v.": string;
"s.vv.": string;
"v.": string;
"vv.": string;
"vol.": string;
"vols": string;
"": string;
"¶¶": string;
"§": string;
"§§": string;
vols: string;
"\u00B6": string;
"\u00B6\u00B6": string;
"\u00A7": string;
"\u00A7\u00A7": string;
};
1 change: 1 addition & 0 deletions dist/data/en.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.en = void 0;
exports.en = {
"book": "book",
"books": "book",
Expand Down
68 changes: 34 additions & 34 deletions dist/data/fr.d.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
export declare const fr: {
"livre": string;
"livres": string;
"chapitre": string;
"chapitres": string;
"colonne": string;
"colonnes": string;
"figure": string;
"figures": string;
"folio": string;
"folios": string;
"numéro": string;
"numéros": string;
"ligne": string;
"lignes": string;
"note": string;
"notes": string;
"opus": string;
"page": string;
"pages": string;
"paragraphe": string;
"paragraphes": string;
"partie": string;
"parties": string;
"section": string;
"sections": string;
livre: string;
livres: string;
chapitre: string;
chapitres: string;
colonne: string;
colonnes: string;
figure: string;
figures: string;
folio: string;
folios: string;
numéro: string;
numéros: string;
ligne: string;
lignes: string;
note: string;
notes: string;
opus: string;
page: string;
pages: string;
paragraphe: string;
paragraphes: string;
partie: string;
parties: string;
section: string;
sections: string;
"sub verbo": string;
"sub verbis": string;
"verset": string;
"versets": string;
"volume": string;
"volumes": string;
verset: string;
versets: string;
volume: string;
volumes: string;
"liv.": string;
"chap.": string;
"col.": string;
"fig.": string;
"fᵒ": string;
"fᵒˢ": string;
"nᵒ": string;
"nᵒˢ": string;
fᵒ: string;
fᵒˢ: string;
nᵒ: string;
nᵒˢ: string;
"l.": string;
"n.": string;
"op.": string;
Expand All @@ -49,5 +49,5 @@ export declare const fr: {
"s. vv.": string;
"v.": string;
"vol.": string;
"§": string;
"\u00A7": string;
};
1 change: 1 addition & 0 deletions dist/data/fr.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fr = void 0;
exports.fr = {
"livre": "book",
"livres": "book",
Expand Down
1 change: 1 addition & 0 deletions dist/util/extract-citations.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* END HEADER
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractCitations = void 0;
const validator_1 = require("./validator");
const regex_1 = require("./regex");
function extractCitations(file, strict = false) {
Expand Down
1 change: 1 addition & 0 deletions dist/util/regex.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* END HEADER
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.locatorRE = exports.looseCitekeyValidatorRE = exports.strictCitekeyValidatorRE = exports.citationExtractionRE = exports.fullCitationValidatorRE = void 0;
exports.fullCitationValidatorRE = /^\[([^[\]]*@[^[\]]+)\]$/;
exports.citationExtractionRE = /(\[([^[\]]*@[^[\]]+)\])|(@[\p{L}\d_][\p{L}\d_:.#$%&\-+?<>~\/]*)/gu;
exports.strictCitekeyValidatorRE = /^@?([a-zA-Z0-9_][a-zA-Z0-9_:.#$%&\-+?<>~/]*)$/;
Expand Down
1 change: 1 addition & 0 deletions dist/util/retrieve-locator.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* END HEADER
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractLocator = void 0;
const regex_1 = require("../util/regex");
const en_1 = require("../data/en");
const de_1 = require("../data/de");
Expand Down
1 change: 1 addition & 0 deletions dist/util/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* END HEADER
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateCitationID = exports.validateCitationPart = exports.validateFullCitation = void 0;
const regex_1 = require("./regex");
function validateFullCitation(citation) {
return regex_1.fullCitationValidatorRE.test(citation);
Expand Down

0 comments on commit 9b1cc82

Please sign in to comment.