Skip to content

Commit

Permalink
feat: add support for cff format
Browse files Browse the repository at this point in the history
  • Loading branch information
timlrx committed Oct 12, 2023
1 parent afd1dc0 commit 13405af
Show file tree
Hide file tree
Showing 8 changed files with 751 additions and 7 deletions.
5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"cross-fetch": "^4.0.0",
"hast-util-from-dom": "^5.0.0",
"hast-util-from-parse5": "^8.0.1",
"js-yaml": "^4.1.0",
"parse5": "^7.1.2",
"unified": "^11.0.0",
"unist-util-visit": "^5.0.0"
Expand Down Expand Up @@ -134,4 +135,4 @@
"prettier --write"
]
}
}
}
5 changes: 2 additions & 3 deletions src/citation-js/core/plugins/input/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ const nativeAsyncParsers = {
export function data(input, type) {
if (typeof parsers[type] === 'function') {
return parsers[type](input)
} else if (typeof nativeParsers[type] === 'function') {
return nativeParsers[type](input)
} else {
throw new TypeError(`No synchronous parser found for ${type}`)
throw new Error('This format is not supported or recognized')
// throw new TypeError(`No synchronous parser found for ${type}`)
}
}

Expand Down
Loading

0 comments on commit 13405af

Please sign in to comment.