Skip to content

feat: add --no-preamble to omit the markup definitions - #50

Open
benmandrew wants to merge 1 commit into
sou1118:mainfrom
benmandrew:feat/no-preamble
Open

benmandrew wants to merge 1 commit into
sou1118:mainfrom
benmandrew:feat/no-preamble

Conversation

@benmandrew

Copy link
Copy Markdown

Every output file starts with its own #let diff-added and #let diff-deleted. A caller who wants different styling has to remove those lines from each file, because they would override an imported definition.

--no-preamble leaves the definitions out, and the caller supplies them, for example with #import "markup.typ": *. The public render(&[DiffResult]) interface is unchanged; it now calls a new render_body, which returns the output without the preamble. The README lists the flag.

The output always defines diff-added and diff-deleted, so a caller that
wants its own styling has to strip them from every file. With
--no-preamble they are left out, and the caller imports its own
definitions. render() is unchanged; render_body() returns the body.
Copilot AI balanced review requested due to automatic review settings October 20, 2026 23:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fde088f8-52b2-4136-94a3-7c3ecf6f32d0
📥 Commits

Reviewing files that changed from the base of the PR and between a4761cc and c0d79f4.

📒 Files selected for processing: 4
  • README.md
  • src/main.rs
  • src/render.rs
  • tests/integration.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants