@retorquere/bibtex-parser 7.0.11 → 7.0.13
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/chunker.d.ts +11 -1
- package/chunker.js +67 -36
- package/grammar.js +475 -505
- package/index.js +3 -2
- package/package.json +9 -9
package/index.js
CHANGED
|
@@ -299,7 +299,7 @@ class Parser {
|
|
|
299
299
|
ast(input, clean = true) {
|
|
300
300
|
let parsed = [];
|
|
301
301
|
for (const chunk of chunker.parse(input)) {
|
|
302
|
-
const { children } = bibtex.parse(chunk.text, Object.assign(Object.assign({}, this.options), { combining: unicode2latex_1.combining.
|
|
302
|
+
const { children } = bibtex.parse(chunk.text, Object.assign(Object.assign({}, this.options), { combining: unicode2latex_1.combining.macros }));
|
|
303
303
|
if (clean)
|
|
304
304
|
this.clean(children);
|
|
305
305
|
parsed = parsed.concat(children);
|
|
@@ -419,7 +419,7 @@ class Parser {
|
|
|
419
419
|
parseChunk(chunk) {
|
|
420
420
|
this.chunk = chunk.text;
|
|
421
421
|
try {
|
|
422
|
-
let bib = bibtex.parse(chunk.text, Object.assign(Object.assign({}, this.options), { combining: unicode2latex_1.combining.
|
|
422
|
+
let bib = bibtex.parse(chunk.text, Object.assign(Object.assign({}, this.options), { combining: unicode2latex_1.combining.macros }));
|
|
423
423
|
if (bib.kind !== 'Bibliography')
|
|
424
424
|
throw new Error(this.show(bib));
|
|
425
425
|
bib = this.clean(bib);
|
|
@@ -1292,6 +1292,7 @@ class Parser {
|
|
|
1292
1292
|
this.field.text = this.field.text.trim();
|
|
1293
1293
|
this.field.text = this.field.text.replace(/<\/([a-z])><\1>/g, '');
|
|
1294
1294
|
this.field.text = this.field.text.replace(/<([a-z])>(\s*)<\/\1>/g, '$1');
|
|
1295
|
+
this.field.text = this.field.text.replace(/<p>[ \r\n]*(<li>|<\/ol>|<\/ul>)/g, '$1');
|
|
1295
1296
|
if (!this.field.text)
|
|
1296
1297
|
continue;
|
|
1297
1298
|
// disable sentenceCasing if not an english
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retorquere/bibtex-parser",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.13",
|
|
4
4
|
"description": "BibTeX parser",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"author": "Emiliano Heyns",
|
|
38
38
|
"license": "ISC",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@microsoft/api-documenter": "^7.23.
|
|
41
|
-
"@microsoft/api-extractor": "^7.
|
|
42
|
-
"@types/node": "^20.11.
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
44
|
-
"@typescript-eslint/parser": "^
|
|
40
|
+
"@microsoft/api-documenter": "^7.23.26",
|
|
41
|
+
"@microsoft/api-extractor": "^7.40.3",
|
|
42
|
+
"@types/node": "^20.11.19",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
44
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
45
45
|
"command-line-args": "^5.2.1",
|
|
46
46
|
"csv": "^6.3.6",
|
|
47
47
|
"digital-tree": "^2.0.4",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"glob": "^10.3.10",
|
|
53
53
|
"mkdirp": "^3.0.1",
|
|
54
54
|
"node-fetch": "^3.3.2",
|
|
55
|
-
"peggy": "^
|
|
56
|
-
"piscina": "^4.3.
|
|
55
|
+
"peggy": "^4.0.0",
|
|
56
|
+
"piscina": "^4.3.2",
|
|
57
57
|
"slug": "^8.2.3",
|
|
58
58
|
"tap": "^18.7.0",
|
|
59
59
|
"ts-node": "^10.9.2",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"typescript": "^5.3.3"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"unicode2latex": "^
|
|
64
|
+
"unicode2latex": "^5.0.3",
|
|
65
65
|
"xregexp": "^5.1.1"
|
|
66
66
|
},
|
|
67
67
|
"files": [
|