Repository navigation
Add image scaling support - #71
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: faa0223e55
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (if width | ||
| (values width (round (* width source-height) source-width)) | ||
| (values (round (* height source-width) source-height) height)))) |
There was a problem hiding this comment.
Clamp inferred dimensions to a positive pixel count
When a strongly non-square image is scaled to a small size, round can infer zero: for example, a 2×1 source declared with :width 1 produces height="0", collapsing the rendered image despite the API's positive-pixel contract. Clamp the inferred side to at least 1 and add a non-square downscaling regression test.
AGENTS.md reference: AGENTS.md:L43-L43
Useful? React with 👍 / 👎.
| (format stream "<img src=\"~A\" alt=\"~A\"~@[ width=\"~A\"~]~@[ height=\"~A\"~]>" | ||
| (image-source obj) | ||
| (common-doc:description obj) |
There was a problem hiding this comment.
Escape attributes in sized Markdown image HTML
When a sized image has a description containing HTML attribute characters, such as :description "A \"large\" diagram", this direct format inserts the value unescaped and emits malformed raw HTML; crafted descriptions can also introduce extra attributes. Escape both the generated source URL and alt text as HTML attribute values before emitting the sized Markdown image, and cover special-character descriptions.
AGENTS.md reference: AGENTS.md:L43-L43
Useful? React with 👍 / 👎.
Summary
defassetwith the breakingdefimageAPI.:widthand:heightpixel values; only dimensions explicitly supplied by the author are emitted.imgelement for Markdown when dimensions are requested; scale the project logo to 256px.Validation
asdf:test-system "40ants-doc-test"40ants-linter --system "40ants-doc, 40ants-doc-full, 40ants-doc-test" --importsCloses #43.