Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropped "(" when following "]. " of citation #10451

Closed
reagle opened this issue Dec 10, 2024 · 2 comments
Closed

Dropped "(" when following "]. " of citation #10451

reagle opened this issue Dec 10, 2024 · 2 comments
Labels

Comments

@reagle
Copy link

reagle commented Dec 10, 2024

For some reason related to the CSL processing of chicago-fullnote-bibliography.csl, when an open parenthesis follows the closing bracket of a citation and a period, it is lost in HTML output.
In the example below, the "(" before "We" is missing in the HTML.
If I remove the period, the missing parenthesis will return.

❯ pandoc --version
pandoc 3.6
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /Users/reagle/.pandoc

❯ cd ~/.csl

❯ git log -1 --pretty="format:%ci" chicago-fullnote-bibliography.csl
2024-03-17 15:02:00 -0400

❯ popd

❯ cat test.md
---
title: "Test"
---

A story below an AI-generated image of a person standing before a wall of colorful post-it notes [@Sparks2024its].
(We only see the back of the person's head.)

---
references:
- id: Sparks2024its
  type: article-newspaper
  author:
  - family: "Sparks"
    given: "Hannah"
  container-title: "New York Post"
  issued:
    year: 2024
    month: 06
    day: 16
  title: "I thought a stalker was leaving creepy notes around my house---the real source was even scarier"
  URL: "<https://nypost.com/2024/06/16/lifestyle/i-thought-a-stalker-was-leaving-creepy-notes-around-my-house-the-real-source-was-even-scarier/>"
  accessed:
    year: 2024
    month: 12
    day: 09
---

❯ pandoc -w html --csl=chicago-fullnote-bibliography.csl --citeproc test.md
<p>A story below an AI-generated image of a person standing before a
wall of colorful post-it notes.<span class="citation"
data-cites="Sparks2024its"><a href="#fn1" class="footnote-ref"
id="fnref1" role="doc-noteref"><sup>1</sup></a></span> We only see the
back of the person’s head.)</p>
<div id="refs" class="references csl-bib-body hanging-indent"
data-entry-spacing="0" role="list">
<div id="ref-Sparks2024its" class="csl-entry" role="listitem">
Sparks, Hannah. <span>“I Thought a Stalker Was Leaving Creepy Notes
Around My House—the Real Source Was Even Scarier.”</span> <em>New York
Post</em>, June 16, 2024. <a
href="https://nypost.com/2024/06/16/lifestyle/i-thought-a-stalker-was-leaving-creepy-notes-around-my-house-the-real-source-was-even-scarier/">https://nypost.com/2024/06/16/lifestyle/i-thought-a-stalker-was-leaving-creepy-notes-around-my-house-the-real-source-was-even-scarier/</a>.
</div>
</div>
<section id="footnotes" class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
<li id="fn1"><p>Hannah Sparks, <span>“I Thought a Stalker Was Leaving
Creepy Notes Around My House—the Real Source Was Even Scarier,”</span>
<em>New York Post</em>, June 16, 2024, <a
href="https://nypost.com/2024/06/16/lifestyle/i-thought-a-stalker-was-leaving-creepy-notes-around-my-house-the-real-source-was-even-scarier/">https://nypost.com/2024/06/16/lifestyle/i-thought-a-stalker-was-leaving-creepy-notes-around-my-house-the-real-source-was-even-scarier/</a>.<a
href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
@reagle reagle added the bug label Dec 10, 2024
@jgm
Copy link
Owner

jgm commented Dec 10, 2024

It is being removed by mvPunct in l. 109 of T.P.Citeproc.

@jgm
Copy link
Owner

jgm commented Dec 10, 2024

I think this traces to an issue in citeproc, dropTextWhile.

jgm added a commit to jgm/citeproc that referenced this issue Dec 10, 2024
Ensure that they treat SoftBreak like Space.
See jgm/pandoc#10451.
@jgm jgm closed this as completed in f6d617c Dec 10, 2024
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jan 30, 2025
## 0.8.1.2

  * Allow containers 0.7 (#143)

  * Update tests to use Diff >= 1.0 (#146).

  * Fix `dropTextWhile` and `dropTextWhileEnd` in Citeproc.Pandoc.
    Ensure that they treat SoftBreak like Space (jgm/pandoc#10451).

## 0.8.1.1

  * Include `10/` prefix in short DOI links (#136).

  * Properly implement `demote-non-dropping-particle="sort-only"` (#141).
    We had previously gotten sorting behavior right for this, but
    not display behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants