Make no-output code behave like running it, and fix message/warning r…#3
Merged
Conversation
…endering - Evaluate expressions in the global environment so assignments and other side effects persist, matching the documented behaviour. When code prints nothing to the console (e.g. `x <- c(1, 2)`), no output block is inserted and any stale block is removed. - Normalise captured output, messages, warnings and multi-line errors so every physical line gets its own `# ` comment prefix. Condition messages carry trailing/embedded newlines that previously leaked uncommented text into the `.R` script. - magrittr pipe operators are injected into the global environment only when installed but not attached, and removed again on exit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pvg4ySztwVFjecx7hNUnA9
danielrak
pushed a commit
that referenced
this pull request
Jun 24, 2026
Integrates the quality-audit and significant-improvement work: a fully refactored, unit-tested addin (helpers extracted for testability, more robust expression-bounds detection, selection-contains-block handling, ggplot placeholder rendering) plus a testthat suite, renamed .Rproj, and updated docs. Reconciles with the previously merged no-output/message-rendering fix (PR #3): message/warning/error newline handling and global-environment evaluation are already covered by the refactor, and the "no console output behaves exactly like running the code" behaviour (no block inserted for plain assignments; stale blocks removed) is re-applied on top of the new structure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pvg4ySztwVFjecx7hNUnA9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…endering
x <- c(1, 2)), no output block is inserted and any stale block is removed.#comment prefix. Condition messages carry trailing/embedded newlines that previously leaked uncommented text into the.Rscript.Claude-Session: https://claude.ai/code/session_01Pvg4ySztwVFjecx7hNUnA9