citeproc: locators are not parsed (`p. 3` stays literal text)

Đang mở
#1,321 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
markdown, rust
Lĩnh vực
documentation

Hướng nghiên cứu

The bug is in the citation conversion in crates/pampa/src/citeproc_filter.rs, where locator: None is set with a TODO to extract the locator from the suffix. Start there and check how the suffix text after the key is passed through, then compare against the expected output for p. 3, pp. 3-5 and the multi-cite case. Done when the citeproc output formats locators as pandoc does (label removed for default style, en dash in ranges), which the repro in the issue shows.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Tested with q2 0.47.0 and pandoc 3.14 (via QUARTO_PANDOC) on Windows 11, compared with Quarto 1.11.9 and plain pandoc 3.14.

q2 passes the text after the key on as a plain suffix and never extracts a locator: the conversion in crates/pampa/src/citeproc_filter.rs has locator: None, // TODO: Extract locator from suffix. So the style can't format the locator: the label stays as written, and ranges keep their hyphen.

Repro (default style, any bibliography with x2 and x):

A [@x2, p. 3]. B [@x2, pp. 3-5]. E [@x2; @x, p. 7].

Actual (q2): A (Aa 2000, p. 3). B (Aa 2000, pp. 3-5). E (Aa 2000; Vries 2019, p. 7).

Expected (pandoc): A (Aa 2000, 3). B (Aa 2000, 3–5). E (Aa 2000; Vries 2019, 7).

With APA, which prints "p." itself, the output looks right, so the problem is easy to miss.

Ngôn ngữ chính
Rust
Star
316
Fork
23
Merge trung bình
11 giờ 49 phút
Pull request đã merge (30 ngày)
245

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/q2

Tất cả issue của quarto-dev/q2

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.