biblatex-csl-converter
Version:
a set of converters: biblatex => json, CSL => json, json => biblatex, json => CSL
13 lines (11 loc) • 449 B
text/typescript
// If one runs the CSL exporter with escapeText = true, the output from
// citeproc (bibliography and citation entries) will need to be unescaped
// using this function.
export function unescapeCSL(theValue: string): string {
return theValue
.replace(/&/g, "&")
.replace(/&lt;/g, "<")
.replace(/&gt;/g, ">")
.replace(/&apos;/g, "'")
.replace(/&quot;/g, """)
}