Skip to content

[Bug]: A single CSL-JSON object in a mixed paste is read as free text #309

Backlog

Description

@dknauss

Summary

A single CSL-JSON object pasted together with other citations, separated by blank lines, is read as free text, and the JSON itself becomes the citation. Pasted alone, the same object imports correctly. docs/supported-input-style-matrix.md lists "CSL-JSON (array or single item)" as supported.

Reproduction steps

  1. Add a Bibliography block.
  2. Paste a BibTeX entry, a blank line, a free-text book citation, a blank line, and then:
    {"type":"software","title":"Migrate to WordPress.com","author":[{"literal":"WordPress.org"}],"version":"1.0","URL":"https://wordpress.org/plugins/wpcom-migration/","accessed":{"date-parts":[[2026,11,24]]}}
  3. Click Add.

Result: "Added 3 citations. Review 1 imported record before publishing." The third entry is the raw JSON formatted as a title with "n.d.", and it's flagged "Read from pasted text without an identifier."

Expected behavior

Either the object imports as CSL-JSON, as it does when pasted alone, or the notice says CSL-JSON has to be pasted on its own.

Input format

CSL-JSON (a single item) mixed with BibTeX and free text.

Environment

Borges 1.22.0 (release zip from #306 at baccc21). WordPress 7.1.5, local Studio site, Chicago Notes-Bibliography. Not checked on 1.21.0.

Additional context

The review flag means it isn't added silently. Found during the 1.22.0 release-readiness run (comment on #306). Whether 1.21.0 behaves the same hasn't been checked.

Activity

  1. added
    bug
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions