From f770d5d426346d7155cac464df04c1de23215035 Mon Sep 17 00:00:00 2001 From: Alex Rothuis Date: Sat, 6 Apr 2024 23:23:17 +0200 Subject: [PATCH 1/7] chore: update project dependencies --- package-lock.json | 379 ++++++++++++++++++++++++---------------------- 1 file changed, 201 insertions(+), 178 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc1f448..b5563c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,12 +39,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -90,13 +91,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -104,14 +106,14 @@ } }, "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -136,34 +138,34 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", - "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -213,21 +215,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -257,14 +268,15 @@ } }, "node_modules/@babel/highlight": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", - "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -342,9 +354,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -354,34 +366,34 @@ } }, "node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", - "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.2", - "debug": "^4.1.0", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -389,12 +401,13 @@ } }, "node_modules/@babel/types": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", - "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -650,37 +663,37 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@nodelib/fs.scandir": { @@ -2122,9 +2135,9 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "engines": { "node": "*" @@ -3905,9 +3918,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4349,9 +4362,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -4474,12 +4487,13 @@ } }, "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "requires": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" } }, "@babel/compat-data": { @@ -4512,25 +4526,26 @@ } }, "@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dev": true, "requires": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "dependencies": { "@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" } } } @@ -4548,28 +4563,28 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", - "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" } }, "@babel/helper-module-imports": { @@ -4607,18 +4622,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" } }, + "@babel/helper-string-parser": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", + "dev": true + }, "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -4639,14 +4660,15 @@ } }, "@babel/highlight": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", - "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "dependencies": { "ansi-styles": { @@ -4708,47 +4730,48 @@ } }, "@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "dev": true }, "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" } }, "@babel/traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", - "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.2", - "debug": "^4.1.0", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", - "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -4943,31 +4966,31 @@ } }, "@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true }, "@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true }, "@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@nodelib/fs.scandir": { @@ -6032,9 +6055,9 @@ "dev": true }, "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true }, "get-intrinsic": { @@ -7299,9 +7322,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true }, "serialize-javascript": { @@ -7645,9 +7668,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "workerpool": { From e1b6726141cae77b72e5beb148239415436ab966 Mon Sep 17 00:00:00 2001 From: Alex Rothuis Date: Sat, 6 Apr 2024 23:29:26 +0200 Subject: [PATCH 2/7] chore: add explicit true check, uniformize casing --- src/renderer.js | 2 +- test/integration.test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer.js b/src/renderer.js index 4689966..146c568 100644 --- a/src/renderer.js +++ b/src/renderer.js @@ -73,7 +73,7 @@ function renderer(context) { env.bib.currentRefs = []; - if (wrapBibliography) { + if (wrapBibliography === true) { return '\n'; } diff --git a/test/integration.test.js b/test/integration.test.js index 2bd3ff7..1c3325a 100644 --- a/test/integration.test.js +++ b/test/integration.test.js @@ -118,7 +118,7 @@ describe('markdown-it plug-in', () => { expect(output).to.equal(expected); }); - specify('Custom wrapper for bibliography contents', () => { + specify('custom wrapper for bibliography contents', () => { md.use(mdBiblatex, { bibPath: `${__dirname}/fixtures/bibliography.bib`, bibliographyContentsWrapper: 'section', @@ -131,7 +131,7 @@ describe('markdown-it plug-in', () => { expect(output).to.equal(expected); }); - specify('Custom wrapper for bibliography entry', () => { + specify('custom wrapper for bibliography entry', () => { md.use(mdBiblatex, { bibPath: `${__dirname}/fixtures/bibliography.bib`, bibliographyEntryWrapper: 'li', From a8988c55881eec8af7490faf089123c2caf68faf Mon Sep 17 00:00:00 2001 From: Alex Rothuis Date: Sun, 7 Apr 2024 01:24:24 +0200 Subject: [PATCH 3/7] feat[breaking]: add cite-id and bib-id; support linking --- README.md | 102 +++++++++++-- src/index.js | 3 + src/parser.js | 2 +- src/renderer.js | 37 +++-- test/fixtures/comprehensive-chicago.html | 142 +++++++++--------- test/fixtures/comprehensive-nl-nl.html | 142 +++++++++--------- test/fixtures/comprehensive.html | 142 +++++++++--------- test/fixtures/custom-bibliography-mark.html | 10 +- test/fixtures/custom-ref-marks.html | 8 +- test/fixtures/infix-composite.html | 2 +- test/fixtures/linked-bibliography.html | 13 ++ test/fixtures/linked-bibliography.md | 7 + test/fixtures/multiple-bibliographies.html | 16 +- test/fixtures/no-bibliography.html | 4 +- ...-bibliography-custom-contents-wrapper.html | 8 +- ...ect-bibliography-custom-entry-wrapper.html | 8 +- .../select-bibliography-custom-title.html | 8 +- .../fixtures/select-bibliography-no-wrap.html | 8 +- test/fixtures/select-bibliography.html | 8 +- test/integration.test.js | 13 ++ 20 files changed, 406 insertions(+), 277 deletions(-) create mode 100644 test/fixtures/linked-bibliography.html create mode 100644 test/fixtures/linked-bibliography.md diff --git a/README.md b/README.md index 846fff6..38b2fa3 100644 --- a/README.md +++ b/README.md @@ -74,17 +74,17 @@ It produces the following HTML thanks to the power of ```html

- A bibliography (Cohen, 1963) is only produced for the items cited (Susskind & Hrabovsky, - 2014). + A bibliography (Cohen, 1963) is only produced for the + items cited (Susskind & Hrabovsky, 2014).

Bibliography

-
+
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
-
+
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
@@ -109,7 +109,9 @@ by wrapping it in curly braces: Results in: ```html -

(see Cohen, 1963)

+

+ (see Cohen, 1963) +

``` ### Locator @@ -126,8 +128,12 @@ citation, you can use the locator mark (`#`): Result: ```html -

(Cohen, 1963, p. 3)

-

(see Cohen, 1963, p. 3)

+

+ (Cohen, 1963, p. 3) +

+

+ (see Cohen, 1963, p. 3) +

``` ### Different citation modes @@ -166,13 +172,13 @@ citations using an en-US locale and the APA style: ```html

Regular

-

A regular citation: (Cohen, 1963)

+

A regular citation: (Cohen, 1963)

Author only

-

A citation with the author only: Cohen

+

A citation with the author only: Cohen

Suppress author

-

A citation with the author suppressed: (1963)

+

A citation with the author suppressed: (1963)

Composite

-

A composite citation: Cohen (1963)

+

A composite citation: Cohen (1963)

``` ### Multiple items in a single citation @@ -187,15 +193,84 @@ citation, by using a semicolon (`;`): This outputs the following: ```html -

(Cohen, 1963; Susskind & Hrabovsky, 2014).

+

+ (Cohen, 1963; Susskind & Hrabovsky, 2014). +

+``` + +### Anchor tags + +To add anchor tags between a citation and a bibliography item, +set the `linkToBibliography` option to true. + +This will turn the following: + +```md +A bibliography [@Cohen-1963] is only produced for +the items cited [@Susskind-Hrabovsky-2014]. + +For multiple items in a citation, only the first is linked +[@Holleis-Wagner-Koolwaaij-2010; @Shapiro-2018]. + +[bibliography] +``` + +Into this: + +```html +

+ A bibliography (Cohen, 1963) is + only produced for the items cited + (Susskind & Hrabovsky, 2014). +

+

+ For multiple items in a citation, only the first is linked + (Holleis, Wagner, & Koolwaaij, 2010; Shapiro, 2018). +

+
+

Bibliography

+
+
+ Cohen, P. J. (1963). The independence of the continuum hypothesis. + Proceedings of the National Academy of Sciences, 50(6), 1143–1148. +
+
+ Holleis, P., Wagner, M., & Koolwaaij, J. (2010). Studying mobile context-aware social + services in the wild. Proc. of the 6th Nordic Conf. on Human-Computer Interaction, + 207–216. New York, NY: ACM. +
+
+ Shapiro, H. M. (2018). Flow Cytometry: The Glass Is Half Full. In T. S. Hawley & R. G. + Hawley (Eds.), Flow Cytometry Protocols (pp. 1–10). New York, NY: Springer. +
+
+ Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. + New York, NY: Penguin Random House. +
+
+
``` ## Caveats +### Multiple bibliographies: ordering + Since we support multiple bibliographies, ordering has become relevant: each bibliography only contains the references that came directly before it. This means that, currently, a bibliography cannot appear before the references. +### Multiple items in a single citations: only first item is linked + +When using anchor tags to link citation and bibliography item, +and there are multiple items in a single citation, +the first item is always picked. This is due to how +the underlying library processes and parses citation clusters. + ## Configuration options The following options can be passed to the plug-in (defaults shown). @@ -241,6 +316,9 @@ Only `bibPath` is required. // Element that wraps bibliography entry bibliographyEntryWrapper: "div" + + // Whether or not to add anchor tags from citations to bibliography items + linkToBibliography: true, }; ``` diff --git a/src/index.js b/src/index.js index 7f9bc0d..ce3db3f 100644 --- a/src/index.js +++ b/src/index.js @@ -44,6 +44,9 @@ const DEFAULT_OPTIONS = { // Element that wraps bibliography entry bibliographyEntryWrapper: 'div', + + // Whether or not to add anchor tags from citations to bibliography items + linkToBibliography: false, }; function mdBibLatexPlugin(md, _options) { diff --git a/src/parser.js b/src/parser.js index 897b072..c7b155d 100644 --- a/src/parser.js +++ b/src/parser.js @@ -112,4 +112,4 @@ function parser(context) { module.exports = { parser, -}; +}; \ No newline at end of file diff --git a/src/renderer.js b/src/renderer.js index 146c568..4677828 100644 --- a/src/renderer.js +++ b/src/renderer.js @@ -5,6 +5,7 @@ function renderer(context) { bibliographyTitle, bibliographyContentsWrapper, bibliographyEntryWrapper, + linkToBibliography, } = context.options; function reference(tokens, idx, options, env) { @@ -17,10 +18,22 @@ function renderer(context) { env.bib.currentRefs = []; } + if (env.bib.counter === undefined) { + env.bib.counter = 1; + } + env.bib.currentRefs.push(tokens[idx].meta); - const citation = citeproc.processCitationCluster(tokens[idx].meta.citation, [], []); - return citation[1][0][1]; + const citationCluster = citeproc.processCitationCluster(tokens[idx].meta.citation, [], []); + const citeId = `cite-${env.bib.counter}-${tokens[idx].meta.citation.citationItems[0].number}`; + const bibRef = `${env.bib.counter}-${tokens[idx].meta.citation.citationItems[0].id}`; + + let citation = `${citationCluster[1][0][1]}`; + if (linkToBibliography === true) { + citation = `${citation}`; + } + + return citation; } function bibliographyOpen(tokens, idx, options, env) { @@ -50,16 +63,17 @@ function renderer(context) { }); }); - citeproc.updateItems(seen); - const contents = citeproc.makeBibliography()[1]; + const bibIds = citeproc.updateItems(seen); + const contents = citeproc.makeBibliography()[1].map((entry, i) => { + entry = entry.replace(' { - contents[index] = content - .replace('\n${contents.join( '' @@ -72,6 +86,7 @@ function renderer(context) { } env.bib.currentRefs = []; + env.bib.counter += 1; if (wrapBibliography === true) { return '
\n'; diff --git a/test/fixtures/comprehensive-chicago.html b/test/fixtures/comprehensive-chicago.html index 5b857f8..4f5ab29 100644 --- a/test/fixtures/comprehensive-chicago.html +++ b/test/fixtures/comprehensive-chicago.html @@ -3,115 +3,115 @@

An overview of BibTeX entry types

Article

An article from a journal, magazine, newspaper, or periodical.

Regular

-

A regular citation: (Cohen 1963)

+

A regular citation: (Cohen 1963)

Composite

-

A composite citation: Cohen (1963)

+

A composite citation: Cohen (1963)

Suppress author

-

A citation with the author suppressed: (1963)

+

A citation with the author suppressed: (1963)

Author only

-

A citation with the author only: Cohen

+

A citation with the author only: Cohen

Book

A book where the publisher is clearly identifiable.

Regular

-

A regular citation: (Susskind and Hrabovsky 2014)

+

A regular citation: (Susskind and Hrabovsky 2014)

Composite

-

A composite citation: Susskind and Hrabovsky (2014)

+

A composite citation: Susskind and Hrabovsky (2014)

Suppress author

A citation with the author suppressed: -(2014)

+(2014)

Author only

A citation with the author only: -Susskind and Hrabovsky

+Susskind and Hrabovsky

Booklet

A printed work that is bound, but does not have a clearly identifiable publisher or supporting institution.

Regular

-

A regular citation: (Swetla 2015)

+

A regular citation: (Swetla 2015)

Composite

-

A composite citation: Swetla (2015)

+

A composite citation: Swetla (2015)

Suppress author

-

A citation with the author suppressed: (2015)

+

A citation with the author suppressed: (2015)

Author only

-

A citation with the author only: Swetla

+

A citation with the author only: Swetla

Inbook

A section, such as a chapter, or a page range within a book.

Regular

-

A regular citation: (Urry et al. 2016)

+

A regular citation: (Urry et al. 2016)

Composite

-

A composite citation: Urry et al. (2016)

+

A composite citation: Urry et al. (2016)

Suppress author

-

A citation with the author suppressed: (2016)

+

A citation with the author suppressed: (2016)

Author only

-

A citation with the author only: Urry et al.

+

A citation with the author only: Urry et al.

Incollection

A titled section of a book. Such as a short story within the larger collection of short stories that make up the book.

Regular

-

A regular citation: (Shapiro 2018)

+

A regular citation: (Shapiro 2018)

Composite

-

A composite citation: Shapiro (2018)

+

A composite citation: Shapiro (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: Shapiro

+

A citation with the author only: Shapiro

Inproceedings

A paper that has been published in conference proceedings. The usage of conference and inproceedings is the same.

Regular

-

A regular citation: (Holleis, Wagner, and Koolwaaij 2010)

+

A regular citation: (Holleis, Wagner, and Koolwaaij 2010)

Composite

-

A composite citation: Holleis, Wagner, and Koolwaaij (2010)

+

A composite citation: Holleis, Wagner, and Koolwaaij (2010)

Suppress author

-

A citation with the author suppressed: (2010)

+

A citation with the author suppressed: (2010)

Author only

-

A citation with the author only: Holleis, Wagner, and Koolwaaij

+

A citation with the author only: Holleis, Wagner, and Koolwaaij

Manual

A technical manual for a machine software such as would come with a purchase to explain operation to the new owner.

Regular

-

A regular citation: (R Core Team 2018)

+

A regular citation: (R Core Team 2018)

Composite

-

A composite citation: R Core Team (2018)

+

A composite citation: R Core Team (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: R Core Team

+

A citation with the author only: R Core Team

Master's thesis

A thesis written for the Master’s level degree.

Regular

-

A regular citation: (Tang 1996)

+

A regular citation: (Tang 1996)

Composite

-

A composite citation: Tang (1996)

+

A composite citation: Tang (1996)

Suppress author

-

A citation with the author suppressed: (1996)

+

A citation with the author suppressed: (1996)

Author only

-

A citation with the author only: Tang

+

A citation with the author only: Tang

Misc

Used if none of the other entry types quite match the source. Frequently used to cite web pages, but can be anything from lecture slides to personal notes.

Regular

-

A regular citation: (NASA 2015)

+

A regular citation: (NASA 2015)

Composite

-

A composite citation: NASA (2015)

+

A composite citation: NASA (2015)

Suppress author

-

A citation with the author suppressed: (2015)

+

A citation with the author suppressed: (2015)

Author only

-

A citation with the author only: NASA

+

A citation with the author only: NASA

PHD thesis

A thesis written for the PhD level degree.

Regular

-

A regular citation: (Rempel 1956)

+

A regular citation: (Rempel 1956)

Composite

-

A composite citation: Rempel (1956)

+

A composite citation: Rempel (1956)

Suppress author

-

A citation with the author suppressed: (1956)

+

A citation with the author suppressed: (1956)

Author only

-

A citation with the author only: Rempel

+

A citation with the author only: Rempel

Proceedings

A conference proceeding.

Regular

-

A regular citation: (Stepney and Verlan 2018)

+

A regular citation: (Stepney and Verlan 2018)

Composite

-

A composite citation: Stepney and Verlan (2018)

+

A composite citation: Stepney and Verlan (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: Stepney and Verlan

+

A citation with the author only: Stepney and Verlan

Techreport

An institutionally published report such as a report from a school, a government organization, @@ -119,59 +119,59 @@

Techreport

This entry type is also frequently used for white papers and working papers.

Regular

-

A regular citation: (Bennett, Bowman, and Wright 2018)

+

A regular citation: (Bennett, Bowman, and Wright 2018)

Composite

-

A composite citation: Bennett, Bowman, and Wright (2018)

+

A composite citation: Bennett, Bowman, and Wright (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: Bennett, Bowman, and Wright

+

A citation with the author only: Bennett, Bowman, and Wright

Unpublished

A document that has not been officially published such as a paper draft or manuscript in preparation.

Regular

-

A regular citation: (Suresh 2006)

+

A regular citation: (Suresh 2006)

Composite

-

A composite citation: Suresh (2006)

+

A composite citation: Suresh (2006)

Suppress author

-

A citation with the author suppressed: (2006)

+

A citation with the author suppressed: (2006)

Author only

-

A citation with the author only: Suresh

+

A citation with the author only: Suresh

Other features

Prefixes

-

We can add a prefix to a citation, by wrapping it in curly braces: (see Rempel 1956)

+

We can add a prefix to a citation, by wrapping it in curly braces: (see Rempel 1956)

Locators

We can append a locator to a citation by using a hashtag: -(NASA 2015, 3)

+(NASA 2015, 3)

Combining locators and prefixes

These features can be combined: -(c.f. R Core Team 2018, chap. 3). +(c.f. R Core Team 2018, chap. 3). We can even use different modes, such -as suppressing the author: (c.f. 2018, chap. 3).

+as suppressing the author: (c.f. 2018, chap. 3).

Multiple references in a single citation

It is possible to reference multiple sources in a single citation, by using a semicolon (;): -(Holleis, Wagner, and Koolwaaij 2010; Shapiro 2018).

+(Holleis, Wagner, and Koolwaaij 2010; Shapiro 2018).

Modes, prefixes and multiple references

We can use a mode while referring to multiple sources,by adding a mark before the first reference and we can use a prefix per reference: -c.f. Shapiro (c.f. 2018; different: Tang 1996, 3).

+c.f. Shapiro (c.f. 2018; different: Tang 1996, 3).

Generate bibliography

Bibliography

-
Bennett, Vicki, Kate Bowman, and Sarah Wright. 2018. “WAsatch SOlar PRoject Final Report.” DOE-SLC-6903-1. Salt Lake City, UT.
-
Cohen, P. J. 1963. “The Independence of the Continuum Hypothesis.” Proceedings of the National Academy of Sciences 50 (6): 1143–48.
-
Holleis, Paul, Matthias Wagner, and Johan Koolwaaij. 2010. “Studying Mobile Context-Aware Social Services in the Wild.” In Proc. of the 6th Nordic Conf. on Human-Computer Interaction, 207–16. NordiCHI. New York, NY: ACM.
-
NASA. 2015. “Pluto: The ‘Other’ Red Planet.” Https://www.nasa.gov/nh/pluto-the-other-red-planet.
-
R Core Team. 2018. R: A Language and Environment for Statistical Computing. Vienna, Austria.
-
Rempel, Robert Charles. 1956. “Relaxation Effects for Coupled Nuclear Spins.” Stanford, CA.
-
Shapiro, Howard M. 2018. “Flow Cytometry: The Glass Is Half Full.” In Flow Cytometry Protocols, edited by Teresa S. Hawley and Robert G. Hawley, 1–10. New York, NY: Springer.
-
Stepney, Susan, and Sergey Verlan, eds. 2018. Proceedings of the 17th International Conference on Computation and Natural Computation, Fontainebleau, France. Vol. 10867. Lecture Notes in Computer Science. Cham, Switzerland: Springer.
-
Suresh, Mohinder. 2006. “Evolution: A Revised Theory.”
-
Susskind, Leonard, and George Hrabovsky. 2014. Classical Mechanics: The Theoretical Minimum. New York, NY: Penguin Random House.
-
Swetla, Maria. 2015. “Canoe Tours in SWeden.” Distributed at the Stockholm Tourist Office.
-
Tang, Jian. 1996. “Spin Structure of the Nucleon in the Asymptotic Limit.” Cambridge, MA.
-
Urry, Lisa A., Michael L. Cain, Steven A. Wasserman, Peter V. Minorsky, and Jane B. Reece. 2016. “Photosynthesis.” In Campbell Biology, 187–221. New York, NY: Pearson.
+
Bennett, Vicki, Kate Bowman, and Sarah Wright. 2018. “WAsatch SOlar PRoject Final Report.” DOE-SLC-6903-1. Salt Lake City, UT.
+
Cohen, P. J. 1963. “The Independence of the Continuum Hypothesis.” Proceedings of the National Academy of Sciences 50 (6): 1143–48.
+
Holleis, Paul, Matthias Wagner, and Johan Koolwaaij. 2010. “Studying Mobile Context-Aware Social Services in the Wild.” In Proc. of the 6th Nordic Conf. on Human-Computer Interaction, 207–16. NordiCHI. New York, NY: ACM.
+
NASA. 2015. “Pluto: The ‘Other’ Red Planet.” Https://www.nasa.gov/nh/pluto-the-other-red-planet.
+
R Core Team. 2018. R: A Language and Environment for Statistical Computing. Vienna, Austria.
+
Rempel, Robert Charles. 1956. “Relaxation Effects for Coupled Nuclear Spins.” Stanford, CA.
+
Shapiro, Howard M. 2018. “Flow Cytometry: The Glass Is Half Full.” In Flow Cytometry Protocols, edited by Teresa S. Hawley and Robert G. Hawley, 1–10. New York, NY: Springer.
+
Stepney, Susan, and Sergey Verlan, eds. 2018. Proceedings of the 17th International Conference on Computation and Natural Computation, Fontainebleau, France. Vol. 10867. Lecture Notes in Computer Science. Cham, Switzerland: Springer.
+
Suresh, Mohinder. 2006. “Evolution: A Revised Theory.”
+
Susskind, Leonard, and George Hrabovsky. 2014. Classical Mechanics: The Theoretical Minimum. New York, NY: Penguin Random House.
+
Swetla, Maria. 2015. “Canoe Tours in SWeden.” Distributed at the Stockholm Tourist Office.
+
Tang, Jian. 1996. “Spin Structure of the Nucleon in the Asymptotic Limit.” Cambridge, MA.
+
Urry, Lisa A., Michael L. Cain, Steven A. Wasserman, Peter V. Minorsky, and Jane B. Reece. 2016. “Photosynthesis.” In Campbell Biology, 187–221. New York, NY: Pearson.
diff --git a/test/fixtures/comprehensive-nl-nl.html b/test/fixtures/comprehensive-nl-nl.html index e79bacf..63737e9 100644 --- a/test/fixtures/comprehensive-nl-nl.html +++ b/test/fixtures/comprehensive-nl-nl.html @@ -3,115 +3,115 @@

An overview of BibTeX entry types

Article

An article from a journal, magazine, newspaper, or periodical.

Regular

-

A regular citation: (Cohen, 1963)

+

A regular citation: (Cohen, 1963)

Composite

-

A composite citation: Cohen (1963)

+

A composite citation: Cohen (1963)

Suppress author

-

A citation with the author suppressed: (1963)

+

A citation with the author suppressed: (1963)

Author only

-

A citation with the author only: Cohen

+

A citation with the author only: Cohen

Book

A book where the publisher is clearly identifiable.

Regular

-

A regular citation: (Susskind & Hrabovsky, 2014)

+

A regular citation: (Susskind & Hrabovsky, 2014)

Composite

-

A composite citation: Susskind & Hrabovsky (2014)

+

A composite citation: Susskind & Hrabovsky (2014)

Suppress author

A citation with the author suppressed: -(2014)

+(2014)

Author only

A citation with the author only: -Susskind & Hrabovsky

+Susskind & Hrabovsky

Booklet

A printed work that is bound, but does not have a clearly identifiable publisher or supporting institution.

Regular

-

A regular citation: (Swetla, 2015)

+

A regular citation: (Swetla, 2015)

Composite

-

A composite citation: Swetla (2015)

+

A composite citation: Swetla (2015)

Suppress author

-

A citation with the author suppressed: (2015)

+

A citation with the author suppressed: (2015)

Author only

-

A citation with the author only: Swetla

+

A citation with the author only: Swetla

Inbook

A section, such as a chapter, or a page range within a book.

Regular

-

A regular citation: (Urry, Cain, Wasserman, Minorsky, & Reece, 2016)

+

A regular citation: (Urry, Cain, Wasserman, Minorsky, & Reece, 2016)

Composite

-

A composite citation: Urry, Cain, Wasserman, Minorsky, & Reece (2016)

+

A composite citation: Urry, Cain, Wasserman, Minorsky, & Reece (2016)

Suppress author

-

A citation with the author suppressed: (2016)

+

A citation with the author suppressed: (2016)

Author only

-

A citation with the author only: Urry, Cain, Wasserman, Minorsky, & Reece

+

A citation with the author only: Urry, Cain, Wasserman, Minorsky, & Reece

Incollection

A titled section of a book. Such as a short story within the larger collection of short stories that make up the book.

Regular

-

A regular citation: (Shapiro, 2018)

+

A regular citation: (Shapiro, 2018)

Composite

-

A composite citation: Shapiro (2018)

+

A composite citation: Shapiro (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: Shapiro

+

A citation with the author only: Shapiro

Inproceedings

A paper that has been published in conference proceedings. The usage of conference and inproceedings is the same.

Regular

-

A regular citation: (Holleis, Wagner, & Koolwaaij, 2010)

+

A regular citation: (Holleis, Wagner, & Koolwaaij, 2010)

Composite

-

A composite citation: Holleis, Wagner, & Koolwaaij (2010)

+

A composite citation: Holleis, Wagner, & Koolwaaij (2010)

Suppress author

-

A citation with the author suppressed: (2010)

+

A citation with the author suppressed: (2010)

Author only

-

A citation with the author only: Holleis, Wagner, & Koolwaaij

+

A citation with the author only: Holleis, Wagner, & Koolwaaij

Manual

A technical manual for a machine software such as would come with a purchase to explain operation to the new owner.

Regular

-

A regular citation: (R Core Team, 2018)

+

A regular citation: (R Core Team, 2018)

Composite

-

A composite citation: R Core Team (2018)

+

A composite citation: R Core Team (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: R Core Team

+

A citation with the author only: R Core Team

Master's thesis

A thesis written for the Master’s level degree.

Regular

-

A regular citation: (Tang, 1996)

+

A regular citation: (Tang, 1996)

Composite

-

A composite citation: Tang (1996)

+

A composite citation: Tang (1996)

Suppress author

-

A citation with the author suppressed: (1996)

+

A citation with the author suppressed: (1996)

Author only

-

A citation with the author only: Tang

+

A citation with the author only: Tang

Misc

Used if none of the other entry types quite match the source. Frequently used to cite web pages, but can be anything from lecture slides to personal notes.

Regular

-

A regular citation: (NASA, 2015)

+

A regular citation: (NASA, 2015)

Composite

-

A composite citation: NASA (2015)

+

A composite citation: NASA (2015)

Suppress author

-

A citation with the author suppressed: (2015)

+

A citation with the author suppressed: (2015)

Author only

-

A citation with the author only: NASA

+

A citation with the author only: NASA

PHD thesis

A thesis written for the PhD level degree.

Regular

-

A regular citation: (Rempel, 1956)

+

A regular citation: (Rempel, 1956)

Composite

-

A composite citation: Rempel (1956)

+

A composite citation: Rempel (1956)

Suppress author

-

A citation with the author suppressed: (1956)

+

A citation with the author suppressed: (1956)

Author only

-

A citation with the author only: Rempel

+

A citation with the author only: Rempel

Proceedings

A conference proceeding.

Regular

-

A regular citation: (Stepney & Verlan, 2018)

+

A regular citation: (Stepney & Verlan, 2018)

Composite

-

A composite citation: Stepney & Verlan (2018)

+

A composite citation: Stepney & Verlan (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: Stepney & Verlan

+

A citation with the author only: Stepney & Verlan

Techreport

An institutionally published report such as a report from a school, a government organization, @@ -119,59 +119,59 @@

Techreport

This entry type is also frequently used for white papers and working papers.

Regular

-

A regular citation: (Bennett, Bowman, & Wright, 2018)

+

A regular citation: (Bennett, Bowman, & Wright, 2018)

Composite

-

A composite citation: Bennett, Bowman, & Wright (2018)

+

A composite citation: Bennett, Bowman, & Wright (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: Bennett, Bowman, & Wright

+

A citation with the author only: Bennett, Bowman, & Wright

Unpublished

A document that has not been officially published such as a paper draft or manuscript in preparation.

Regular

-

A regular citation: (Suresh, 2006)

+

A regular citation: (Suresh, 2006)

Composite

-

A composite citation: Suresh (2006)

+

A composite citation: Suresh (2006)

Suppress author

-

A citation with the author suppressed: (2006)

+

A citation with the author suppressed: (2006)

Author only

-

A citation with the author only: Suresh

+

A citation with the author only: Suresh

Other features

Prefixes

-

We can add a prefix to a citation, by wrapping it in curly braces: (see Rempel, 1956)

+

We can add a prefix to a citation, by wrapping it in curly braces: (see Rempel, 1956)

Locators

We can append a locator to a citation by using a hashtag: -(NASA, 2015, p. 3)

+(NASA, 2015, p. 3)

Combining locators and prefixes

These features can be combined: -(c.f. R Core Team, 2018, Chapter 3). +(c.f. R Core Team, 2018, Chapter 3). We can even use different modes, such -as suppressing the author: (c.f. 2018, Chapter 3).

+as suppressing the author: (c.f. 2018, Chapter 3).

Multiple references in a single citation

It is possible to reference multiple sources in a single citation, by using a semicolon (;): -(Holleis, Wagner, & Koolwaaij, 2010; Shapiro, 2018).

+(Holleis, Wagner, & Koolwaaij, 2010; Shapiro, 2018).

Modes, prefixes and multiple references

We can use a mode while referring to multiple sources,by adding a mark before the first reference and we can use a prefix per reference: -c.f. Shapiro (c.f. 2018; different: Tang, 1996, p. 3).

+c.f. Shapiro (c.f. 2018; different: Tang, 1996, p. 3).

Generate bibliography

Bibliography

-
Bennett, V., Bowman, K., & Wright, S. (2018). Wasatch Solar Project Final Report. Salt Lake City, UT.
-
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
-
Holleis, P., Wagner, M., & Koolwaaij, J. (2010). Studying mobile context-aware social services in the wild. Proc. of the 6th Nordic Conf. on Human-Computer Interaction, 207–216. New York, NY: ACM.
-
NASA. (2015). Pluto: The “Other” Red Planet [Https://www.nasa.gov/nh/pluto-the-other-red-planet].
-
R Core Team. (2018). R: A Language and Environment for Statistical Computing. Vienna, Austria.
-
Rempel, R. C. (1956). Relaxation Effects for Coupled Nuclear Spins. Stanford, CA.
-
Shapiro, H. M. (2018). Flow Cytometry: The Glass Is Half Full. In T. S. Hawley & R. G. Hawley (Eds.), Flow Cytometry Protocols (pp. 1–10). New York, NY: Springer.
-
Stepney, S., & Verlan, S. (Eds.). (2018). Proceedings of the 17th International Conference on Computation and Natural Computation, Fontainebleau, France. Cham, Switzerland: Springer.
-
Suresh, M. (2006). Evolution: a revised theory.
-
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
-
Swetla, M. (2015, July). Canoe tours in Sweden [Distributed at the Stockholm Tourist Office].
-
Tang, J. (1996). Spin structure of the nucleon in the asymptotic limit. Cambridge, MA.
-
Urry, L. A., Cain, M. L., Wasserman, S. A., Minorsky, P. V., & Reece, J. B. (2016). Photosynthesis. In Campbell Biology (pp. 187–221). New York, NY: Pearson.
+
Bennett, V., Bowman, K., & Wright, S. (2018). Wasatch Solar Project Final Report. Salt Lake City, UT.
+
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
+
Holleis, P., Wagner, M., & Koolwaaij, J. (2010). Studying mobile context-aware social services in the wild. Proc. of the 6th Nordic Conf. on Human-Computer Interaction, 207–216. New York, NY: ACM.
+
NASA. (2015). Pluto: The “Other” Red Planet [Https://www.nasa.gov/nh/pluto-the-other-red-planet].
+
R Core Team. (2018). R: A Language and Environment for Statistical Computing. Vienna, Austria.
+
Rempel, R. C. (1956). Relaxation Effects for Coupled Nuclear Spins. Stanford, CA.
+
Shapiro, H. M. (2018). Flow Cytometry: The Glass Is Half Full. In T. S. Hawley & R. G. Hawley (Eds.), Flow Cytometry Protocols (pp. 1–10). New York, NY: Springer.
+
Stepney, S., & Verlan, S. (Eds.). (2018). Proceedings of the 17th International Conference on Computation and Natural Computation, Fontainebleau, France. Cham, Switzerland: Springer.
+
Suresh, M. (2006). Evolution: a revised theory.
+
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
+
Swetla, M. (2015, July). Canoe tours in Sweden [Distributed at the Stockholm Tourist Office].
+
Tang, J. (1996). Spin structure of the nucleon in the asymptotic limit. Cambridge, MA.
+
Urry, L. A., Cain, M. L., Wasserman, S. A., Minorsky, P. V., & Reece, J. B. (2016). Photosynthesis. In Campbell Biology (pp. 187–221). New York, NY: Pearson.
diff --git a/test/fixtures/comprehensive.html b/test/fixtures/comprehensive.html index e79bacf..63737e9 100644 --- a/test/fixtures/comprehensive.html +++ b/test/fixtures/comprehensive.html @@ -3,115 +3,115 @@

An overview of BibTeX entry types

Article

An article from a journal, magazine, newspaper, or periodical.

Regular

-

A regular citation: (Cohen, 1963)

+

A regular citation: (Cohen, 1963)

Composite

-

A composite citation: Cohen (1963)

+

A composite citation: Cohen (1963)

Suppress author

-

A citation with the author suppressed: (1963)

+

A citation with the author suppressed: (1963)

Author only

-

A citation with the author only: Cohen

+

A citation with the author only: Cohen

Book

A book where the publisher is clearly identifiable.

Regular

-

A regular citation: (Susskind & Hrabovsky, 2014)

+

A regular citation: (Susskind & Hrabovsky, 2014)

Composite

-

A composite citation: Susskind & Hrabovsky (2014)

+

A composite citation: Susskind & Hrabovsky (2014)

Suppress author

A citation with the author suppressed: -(2014)

+(2014)

Author only

A citation with the author only: -Susskind & Hrabovsky

+Susskind & Hrabovsky

Booklet

A printed work that is bound, but does not have a clearly identifiable publisher or supporting institution.

Regular

-

A regular citation: (Swetla, 2015)

+

A regular citation: (Swetla, 2015)

Composite

-

A composite citation: Swetla (2015)

+

A composite citation: Swetla (2015)

Suppress author

-

A citation with the author suppressed: (2015)

+

A citation with the author suppressed: (2015)

Author only

-

A citation with the author only: Swetla

+

A citation with the author only: Swetla

Inbook

A section, such as a chapter, or a page range within a book.

Regular

-

A regular citation: (Urry, Cain, Wasserman, Minorsky, & Reece, 2016)

+

A regular citation: (Urry, Cain, Wasserman, Minorsky, & Reece, 2016)

Composite

-

A composite citation: Urry, Cain, Wasserman, Minorsky, & Reece (2016)

+

A composite citation: Urry, Cain, Wasserman, Minorsky, & Reece (2016)

Suppress author

-

A citation with the author suppressed: (2016)

+

A citation with the author suppressed: (2016)

Author only

-

A citation with the author only: Urry, Cain, Wasserman, Minorsky, & Reece

+

A citation with the author only: Urry, Cain, Wasserman, Minorsky, & Reece

Incollection

A titled section of a book. Such as a short story within the larger collection of short stories that make up the book.

Regular

-

A regular citation: (Shapiro, 2018)

+

A regular citation: (Shapiro, 2018)

Composite

-

A composite citation: Shapiro (2018)

+

A composite citation: Shapiro (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: Shapiro

+

A citation with the author only: Shapiro

Inproceedings

A paper that has been published in conference proceedings. The usage of conference and inproceedings is the same.

Regular

-

A regular citation: (Holleis, Wagner, & Koolwaaij, 2010)

+

A regular citation: (Holleis, Wagner, & Koolwaaij, 2010)

Composite

-

A composite citation: Holleis, Wagner, & Koolwaaij (2010)

+

A composite citation: Holleis, Wagner, & Koolwaaij (2010)

Suppress author

-

A citation with the author suppressed: (2010)

+

A citation with the author suppressed: (2010)

Author only

-

A citation with the author only: Holleis, Wagner, & Koolwaaij

+

A citation with the author only: Holleis, Wagner, & Koolwaaij

Manual

A technical manual for a machine software such as would come with a purchase to explain operation to the new owner.

Regular

-

A regular citation: (R Core Team, 2018)

+

A regular citation: (R Core Team, 2018)

Composite

-

A composite citation: R Core Team (2018)

+

A composite citation: R Core Team (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: R Core Team

+

A citation with the author only: R Core Team

Master's thesis

A thesis written for the Master’s level degree.

Regular

-

A regular citation: (Tang, 1996)

+

A regular citation: (Tang, 1996)

Composite

-

A composite citation: Tang (1996)

+

A composite citation: Tang (1996)

Suppress author

-

A citation with the author suppressed: (1996)

+

A citation with the author suppressed: (1996)

Author only

-

A citation with the author only: Tang

+

A citation with the author only: Tang

Misc

Used if none of the other entry types quite match the source. Frequently used to cite web pages, but can be anything from lecture slides to personal notes.

Regular

-

A regular citation: (NASA, 2015)

+

A regular citation: (NASA, 2015)

Composite

-

A composite citation: NASA (2015)

+

A composite citation: NASA (2015)

Suppress author

-

A citation with the author suppressed: (2015)

+

A citation with the author suppressed: (2015)

Author only

-

A citation with the author only: NASA

+

A citation with the author only: NASA

PHD thesis

A thesis written for the PhD level degree.

Regular

-

A regular citation: (Rempel, 1956)

+

A regular citation: (Rempel, 1956)

Composite

-

A composite citation: Rempel (1956)

+

A composite citation: Rempel (1956)

Suppress author

-

A citation with the author suppressed: (1956)

+

A citation with the author suppressed: (1956)

Author only

-

A citation with the author only: Rempel

+

A citation with the author only: Rempel

Proceedings

A conference proceeding.

Regular

-

A regular citation: (Stepney & Verlan, 2018)

+

A regular citation: (Stepney & Verlan, 2018)

Composite

-

A composite citation: Stepney & Verlan (2018)

+

A composite citation: Stepney & Verlan (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: Stepney & Verlan

+

A citation with the author only: Stepney & Verlan

Techreport

An institutionally published report such as a report from a school, a government organization, @@ -119,59 +119,59 @@

Techreport

This entry type is also frequently used for white papers and working papers.

Regular

-

A regular citation: (Bennett, Bowman, & Wright, 2018)

+

A regular citation: (Bennett, Bowman, & Wright, 2018)

Composite

-

A composite citation: Bennett, Bowman, & Wright (2018)

+

A composite citation: Bennett, Bowman, & Wright (2018)

Suppress author

-

A citation with the author suppressed: (2018)

+

A citation with the author suppressed: (2018)

Author only

-

A citation with the author only: Bennett, Bowman, & Wright

+

A citation with the author only: Bennett, Bowman, & Wright

Unpublished

A document that has not been officially published such as a paper draft or manuscript in preparation.

Regular

-

A regular citation: (Suresh, 2006)

+

A regular citation: (Suresh, 2006)

Composite

-

A composite citation: Suresh (2006)

+

A composite citation: Suresh (2006)

Suppress author

-

A citation with the author suppressed: (2006)

+

A citation with the author suppressed: (2006)

Author only

-

A citation with the author only: Suresh

+

A citation with the author only: Suresh

Other features

Prefixes

-

We can add a prefix to a citation, by wrapping it in curly braces: (see Rempel, 1956)

+

We can add a prefix to a citation, by wrapping it in curly braces: (see Rempel, 1956)

Locators

We can append a locator to a citation by using a hashtag: -(NASA, 2015, p. 3)

+(NASA, 2015, p. 3)

Combining locators and prefixes

These features can be combined: -(c.f. R Core Team, 2018, Chapter 3). +(c.f. R Core Team, 2018, Chapter 3). We can even use different modes, such -as suppressing the author: (c.f. 2018, Chapter 3).

+as suppressing the author: (c.f. 2018, Chapter 3).

Multiple references in a single citation

It is possible to reference multiple sources in a single citation, by using a semicolon (;): -(Holleis, Wagner, & Koolwaaij, 2010; Shapiro, 2018).

+(Holleis, Wagner, & Koolwaaij, 2010; Shapiro, 2018).

Modes, prefixes and multiple references

We can use a mode while referring to multiple sources,by adding a mark before the first reference and we can use a prefix per reference: -c.f. Shapiro (c.f. 2018; different: Tang, 1996, p. 3).

+c.f. Shapiro (c.f. 2018; different: Tang, 1996, p. 3).

Generate bibliography

Bibliography

-
Bennett, V., Bowman, K., & Wright, S. (2018). Wasatch Solar Project Final Report. Salt Lake City, UT.
-
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
-
Holleis, P., Wagner, M., & Koolwaaij, J. (2010). Studying mobile context-aware social services in the wild. Proc. of the 6th Nordic Conf. on Human-Computer Interaction, 207–216. New York, NY: ACM.
-
NASA. (2015). Pluto: The “Other” Red Planet [Https://www.nasa.gov/nh/pluto-the-other-red-planet].
-
R Core Team. (2018). R: A Language and Environment for Statistical Computing. Vienna, Austria.
-
Rempel, R. C. (1956). Relaxation Effects for Coupled Nuclear Spins. Stanford, CA.
-
Shapiro, H. M. (2018). Flow Cytometry: The Glass Is Half Full. In T. S. Hawley & R. G. Hawley (Eds.), Flow Cytometry Protocols (pp. 1–10). New York, NY: Springer.
-
Stepney, S., & Verlan, S. (Eds.). (2018). Proceedings of the 17th International Conference on Computation and Natural Computation, Fontainebleau, France. Cham, Switzerland: Springer.
-
Suresh, M. (2006). Evolution: a revised theory.
-
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
-
Swetla, M. (2015, July). Canoe tours in Sweden [Distributed at the Stockholm Tourist Office].
-
Tang, J. (1996). Spin structure of the nucleon in the asymptotic limit. Cambridge, MA.
-
Urry, L. A., Cain, M. L., Wasserman, S. A., Minorsky, P. V., & Reece, J. B. (2016). Photosynthesis. In Campbell Biology (pp. 187–221). New York, NY: Pearson.
+
Bennett, V., Bowman, K., & Wright, S. (2018). Wasatch Solar Project Final Report. Salt Lake City, UT.
+
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
+
Holleis, P., Wagner, M., & Koolwaaij, J. (2010). Studying mobile context-aware social services in the wild. Proc. of the 6th Nordic Conf. on Human-Computer Interaction, 207–216. New York, NY: ACM.
+
NASA. (2015). Pluto: The “Other” Red Planet [Https://www.nasa.gov/nh/pluto-the-other-red-planet].
+
R Core Team. (2018). R: A Language and Environment for Statistical Computing. Vienna, Austria.
+
Rempel, R. C. (1956). Relaxation Effects for Coupled Nuclear Spins. Stanford, CA.
+
Shapiro, H. M. (2018). Flow Cytometry: The Glass Is Half Full. In T. S. Hawley & R. G. Hawley (Eds.), Flow Cytometry Protocols (pp. 1–10). New York, NY: Springer.
+
Stepney, S., & Verlan, S. (Eds.). (2018). Proceedings of the 17th International Conference on Computation and Natural Computation, Fontainebleau, France. Cham, Switzerland: Springer.
+
Suresh, M. (2006). Evolution: a revised theory.
+
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
+
Swetla, M. (2015, July). Canoe tours in Sweden [Distributed at the Stockholm Tourist Office].
+
Tang, J. (1996). Spin structure of the nucleon in the asymptotic limit. Cambridge, MA.
+
Urry, L. A., Cain, M. L., Wasserman, S. A., Minorsky, P. V., & Reece, J. B. (2016). Photosynthesis. In Campbell Biology (pp. 187–221). New York, NY: Pearson.
diff --git a/test/fixtures/custom-bibliography-mark.html b/test/fixtures/custom-bibliography-mark.html index 2cc3990..bcc5c47 100644 --- a/test/fixtures/custom-bibliography-mark.html +++ b/test/fixtures/custom-bibliography-mark.html @@ -1,16 +1,16 @@

Book

A book where the publisher is clearly identifiable.

Regular

-

A regular citation: (Susskind & Hrabovsky, 2014)

+

A regular citation: (Susskind & Hrabovsky, 2014)

Composite

-

A composite citation: Susskind & Hrabovsky (2014)

+

A composite citation: Susskind & Hrabovsky (2014)

Suppress author

-

A citation with the author suppressed: (2014)

+

A citation with the author suppressed: (2014)

Author only

-

A citation with the author only: Susskind & Hrabovsky

+

A citation with the author only: Susskind & Hrabovsky

Bibliography

-
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
+
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
diff --git a/test/fixtures/custom-ref-marks.html b/test/fixtures/custom-ref-marks.html index 593f154..1ef5824 100644 --- a/test/fixtures/custom-ref-marks.html +++ b/test/fixtures/custom-ref-marks.html @@ -1,10 +1,10 @@

Book

A book where the publisher is clearly identifiable.

Regular

-

A regular citation: (Susskind & Hrabovsky, 2014)

+

A regular citation: (Susskind & Hrabovsky, 2014)

Composite

-

A composite citation: Susskind & Hrabovsky (2014)

+

A composite citation: Susskind & Hrabovsky (2014)

Suppress author

-

A citation with the author suppressed: (2014)

+

A citation with the author suppressed: (2014)

Author only

-

A citation with the author only: Susskind & Hrabovsky

+

A citation with the author only: Susskind & Hrabovsky

diff --git a/test/fixtures/infix-composite.html b/test/fixtures/infix-composite.html index ef37811..c5728ea 100644 --- a/test/fixtures/infix-composite.html +++ b/test/fixtures/infix-composite.html @@ -1,3 +1,3 @@

Infix text is supported for composite citations as described by -Cohen in his famous book (1963).

+Cohen in his famous book (1963).

diff --git a/test/fixtures/linked-bibliography.html b/test/fixtures/linked-bibliography.html new file mode 100644 index 0000000..ec1a76b --- /dev/null +++ b/test/fixtures/linked-bibliography.html @@ -0,0 +1,13 @@ +

A bibliography (Cohen, 1963) is only produced for +the items cited (Susskind & Hrabovsky, 2014).

+

For multiple items in a citation, only the first is linked +(Holleis, Wagner, & Koolwaaij, 2010; Shapiro, 2018).

+
+

Bibliography

+
+
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
+
Holleis, P., Wagner, M., & Koolwaaij, J. (2010). Studying mobile context-aware social services in the wild. Proc. of the 6th Nordic Conf. on Human-Computer Interaction, 207–216. New York, NY: ACM.
+
Shapiro, H. M. (2018). Flow Cytometry: The Glass Is Half Full. In T. S. Hawley & R. G. Hawley (Eds.), Flow Cytometry Protocols (pp. 1–10). New York, NY: Springer.
+
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
+
+
diff --git a/test/fixtures/linked-bibliography.md b/test/fixtures/linked-bibliography.md new file mode 100644 index 0000000..6e34edb --- /dev/null +++ b/test/fixtures/linked-bibliography.md @@ -0,0 +1,7 @@ +A bibliography [@Cohen-1963] is only produced for +the items cited [@Susskind-Hrabovsky-2014]. + +For multiple items in a citation, only the first is linked +[@Holleis-Wagner-Koolwaaij-2010; @Shapiro-2018]. + +[bibliography] \ No newline at end of file diff --git a/test/fixtures/multiple-bibliographies.html b/test/fixtures/multiple-bibliographies.html index 0ab1170..df2e10a 100644 --- a/test/fixtures/multiple-bibliographies.html +++ b/test/fixtures/multiple-bibliographies.html @@ -1,18 +1,18 @@ -

A bibliography (Cohen, 1963) is only produced for -the items cited (Susskind & Hrabovsky, 2014).

+

A bibliography (Cohen, 1963) is only produced for +the items cited (Susskind & Hrabovsky, 2014).

Bibliography

-
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
-
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
+
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
+
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
-

The items cited after this (Rempel, 1956) are only included -in the second bibliography (Shapiro, 2018).

+

The items cited after this (Rempel, 1956) are only included +in the second bibliography (Shapiro, 2018).

Bibliography

-
Rempel, R. C. (1956). Relaxation Effects for Coupled Nuclear Spins. Stanford, CA.
-
Shapiro, H. M. (2018). Flow Cytometry: The Glass Is Half Full. In T. S. Hawley & R. G. Hawley (Eds.), Flow Cytometry Protocols (pp. 1–10). New York, NY: Springer.
+
Rempel, R. C. (1956). Relaxation Effects for Coupled Nuclear Spins. Stanford, CA.
+
Shapiro, H. M. (2018). Flow Cytometry: The Glass Is Half Full. In T. S. Hawley & R. G. Hawley (Eds.), Flow Cytometry Protocols (pp. 1–10). New York, NY: Springer.
diff --git a/test/fixtures/no-bibliography.html b/test/fixtures/no-bibliography.html index 570b976..e431cfc 100644 --- a/test/fixtures/no-bibliography.html +++ b/test/fixtures/no-bibliography.html @@ -1,2 +1,2 @@ -

No bibliography (R Core Team, 2018) is produced -if we don't place a mark requesting it (NASA, 2015).

+

No bibliography (R Core Team, 2018) is produced +if we don't place a mark requesting it (NASA, 2015).

diff --git a/test/fixtures/select-bibliography-custom-contents-wrapper.html b/test/fixtures/select-bibliography-custom-contents-wrapper.html index 8a16b2a..a9549d7 100644 --- a/test/fixtures/select-bibliography-custom-contents-wrapper.html +++ b/test/fixtures/select-bibliography-custom-contents-wrapper.html @@ -1,9 +1,9 @@ -

A bibliography (Cohen, 1963) is only produced for -the items cited (Susskind & Hrabovsky, 2014).

+

A bibliography (Cohen, 1963) is only produced for +the items cited (Susskind & Hrabovsky, 2014).

Bibliography

-
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
-
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
+
Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
+
Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
diff --git a/test/fixtures/select-bibliography-custom-entry-wrapper.html b/test/fixtures/select-bibliography-custom-entry-wrapper.html index 59c2eef..7f80b8a 100644 --- a/test/fixtures/select-bibliography-custom-entry-wrapper.html +++ b/test/fixtures/select-bibliography-custom-entry-wrapper.html @@ -1,9 +1,9 @@ -

A bibliography (Cohen, 1963) is only produced for -the items cited (Susskind & Hrabovsky, 2014).

+

A bibliography (Cohen, 1963) is only produced for +the items cited (Susskind & Hrabovsky, 2014).

Bibliography

-
  • Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
  • -
  • Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
  • +
  • Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
  • +
  • Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
  • diff --git a/test/fixtures/select-bibliography-custom-title.html b/test/fixtures/select-bibliography-custom-title.html index 2eeaab9..8e53b4c 100644 --- a/test/fixtures/select-bibliography-custom-title.html +++ b/test/fixtures/select-bibliography-custom-title.html @@ -1,9 +1,9 @@ -

    A bibliography (Cohen, 1963) is only produced for -the items cited (Susskind & Hrabovsky, 2014).

    +

    A bibliography (Cohen, 1963) is only produced for +the items cited (Susskind & Hrabovsky, 2014).

    References

    -
    Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
    -
    Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
    +
    Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
    +
    Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
    diff --git a/test/fixtures/select-bibliography-no-wrap.html b/test/fixtures/select-bibliography-no-wrap.html index eaaf33c..a05721f 100644 --- a/test/fixtures/select-bibliography-no-wrap.html +++ b/test/fixtures/select-bibliography-no-wrap.html @@ -1,7 +1,7 @@ -

    A bibliography (Cohen, 1963) is only produced for -the items cited (Susskind & Hrabovsky, 2014).

    +

    A bibliography (Cohen, 1963) is only produced for +the items cited (Susskind & Hrabovsky, 2014).

    Bibliography

    -
    Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
    -
    Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
    +
    Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
    +
    Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
    diff --git a/test/fixtures/select-bibliography.html b/test/fixtures/select-bibliography.html index 8891eb0..d4712de 100644 --- a/test/fixtures/select-bibliography.html +++ b/test/fixtures/select-bibliography.html @@ -1,9 +1,9 @@ -

    A bibliography (Cohen, 1963) is only produced for -the items cited (Susskind & Hrabovsky, 2014).

    +

    A bibliography (Cohen, 1963) is only produced for +the items cited (Susskind & Hrabovsky, 2014).

    Bibliography

    -
    Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
    -
    Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
    +
    Cohen, P. J. (1963). The independence of the continuum hypothesis. Proceedings of the National Academy of Sciences, 50(6), 1143–1148.
    +
    Susskind, L., & Hrabovsky, G. (2014). Classical mechanics: the theoretical minimum. New York, NY: Penguin Random House.
    diff --git a/test/integration.test.js b/test/integration.test.js index 1c3325a..87b7bd7 100644 --- a/test/integration.test.js +++ b/test/integration.test.js @@ -118,6 +118,19 @@ describe('markdown-it plug-in', () => { expect(output).to.equal(expected); }); + specify('linked bibliography items', () => { + md.use(mdBiblatex, { + bibPath: `${__dirname}/fixtures/bibliography.bib`, + linkToBibliography: true, + }); + + const input = fixture('linked-bibliography.md'); + const output = md.render(input); + + const expected = fixture('linked-bibliography.html'); + expect(output).to.equal(expected); + }); + specify('custom wrapper for bibliography contents', () => { md.use(mdBiblatex, { bibPath: `${__dirname}/fixtures/bibliography.bib`, From 55f8f0b5e312d761f72630ac6c178a83c304f3a6 Mon Sep 17 00:00:00 2001 From: Alex Rothuis Date: Sun, 7 Apr 2024 01:26:00 +0200 Subject: [PATCH 4/7] chore: increment major version breaking change: add cite-id and bib-id change: add linking to bib item --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6130555..327e10f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arothuis/markdown-it-biblatex", - "version": "1.0.1", + "version": "2.0.0", "description": "A markdown-it plug-in for rendering citations and a bibliography inside markdown", "keywords": [ "markdown-it", From aadb1c0cc3e9a695cc7ad2c60e1c472c87f55b26 Mon Sep 17 00:00:00 2001 From: Alex Rothuis Date: Sun, 7 Apr 2024 01:46:04 +0200 Subject: [PATCH 5/7] chore: ignore .nyc_output for prettier --- .prettierignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.prettierignore b/.prettierignore index 58f02b9..0722300 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ node_modules test/fixtures -coverage \ No newline at end of file +coverage +.nyc_output \ No newline at end of file From f079affbfe733c79aaf464375876e170d231b966 Mon Sep 17 00:00:00 2001 From: Alex Rothuis Date: Sun, 7 Apr 2024 01:46:34 +0200 Subject: [PATCH 6/7] format: add newline --- src/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.js b/src/parser.js index c7b155d..897b072 100644 --- a/src/parser.js +++ b/src/parser.js @@ -112,4 +112,4 @@ function parser(context) { module.exports = { parser, -}; \ No newline at end of file +}; From 1f4a98bfa14f23c6b64d3c0e25cb641165eb620e Mon Sep 17 00:00:00 2001 From: Alex Rothuis Date: Wed, 10 Apr 2024 22:21:48 +0200 Subject: [PATCH 7/7] chore: document extra caveats --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38b2fa3..c1d3345 100644 --- a/README.md +++ b/README.md @@ -264,12 +264,19 @@ Since we support multiple bibliographies, ordering has become relevant: each bibliography only contains the references that came directly before it. This means that, currently, a bibliography cannot appear before the references. +### Multiple items in a single citation: citation modes unsupported + +Using a citation mode in combination when citing multiple items in a single citation +is currently not supported. + ### Multiple items in a single citations: only first item is linked When using anchor tags to link citation and bibliography item, and there are multiple items in a single citation, -the first item is always picked. This is due to how -the underlying library processes and parses citation clusters. +the first item you name is always used. +This is due to how the underlying library processes and parses citation clusters. +Do note that "the first item you name" is not necessarily the first one that will be rendered +some citation styles change the ordering. ## Configuration options