Skip to content

Conversation

@ultmaster
Copy link
Contributor

Summary

  • keep only one newline between images in 104_financial_analysis.txt
  • remove whitespace between sequential multimedia nodes in MarkdownWriter
  • document the new whitespace logic

Testing

  • npm run build-webview
  • npm run build-cli
  • npm run lint
  • npm test
  • python -m pytest python/tests

https://chatgpt.com/codex/tasks/task_e_686379e79f90832eb96dcfa9550070c3

Copilot AI review requested due to automatic review settings July 1, 2025 06:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses formatting issues by fixing extra blank lines between images in the example file and removing unwanted whitespace between sequential multimedia nodes in the Markdown writer.

  • Removes extra newlines in 104_financial_analysis.txt
  • Adds logic to conditionally remove spaces between multimedia-only nodes in MarkdownWriter
  • Updates documentation comments to describe the new whitespace handling

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/poml/writer.ts Updates whitespace removal logic to handle consecutive multimedia nodes and improves explanatory comments
examples/expects/104_financial_analysis.txt Removes superfluous blank lines between images

// When a whitespace-only box is sandwiched between two multimedia
// boxes (e.g., two consecutive images), we treat it like the spaces
// around a block element so it doesn't generate a blank line.
const afterMedia =
Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

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

Consider extracting the multimedia-only node checks (lines 694-701) into a separate helper function to improve readability and ease future maintenance.

Copilot uses AI. Check for mistakes.
@ultmaster ultmaster merged commit d03a0b0 into main Jul 1, 2025
4 checks passed
@ultmaster ultmaster deleted the codex/fix-extra-space-between-images branch July 9, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants