Skip to content

Commit

Permalink
Merge pull request #29 from ugogon/fixbrackets
Browse files Browse the repository at this point in the history
fix brackets for styles that do not use parentheses
  • Loading branch information
timlrx authored Oct 10, 2023
2 parents 06fc900 + 101e15f commit 82f0b73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gen-citation.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const genCitation = (
// Do not link bracket
const output = isComposite
? `<a href="#bib-${entries[0].id.toLowerCase()}">${citationText}</a>`
: `(<a href="#bib-${entries[0].id.toLowerCase()}">${citationText.slice(1, -1)}</a>)`
: `${citationText.slice(0,1)}<a href="#bib-${entries[0].id.toLowerCase()}">${citationText.slice(1, -1)}</a>${citationText.slice(-1)}`
return [
citationText,
htmlToHast(`<span class="${(inlineClass ?? []).join(' ')}" id=${ids}>${output}</span>`),
Expand Down

0 comments on commit 82f0b73

Please sign in to comment.