Skip to content

Supplement cache generation can emit trailing whitespace #918

Description

@realmarcin

Finding

scripts/cache_supplements.py writes extracted supplementary text verbatim. Docx supplements can carry spaces at line ends, which means a freshly generated references_cache/*.supplement.md can trip git diff --check.

Why it matters

PR #916 needed a mechanical trim after fetching PMID:42549325. Rerunning the generator should not recreate whitespace that the index rejects.

Fix

Normalize extracted supplement text before writing by trimming end-of-line spaces, and add a focused regression test around cache_one output.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions