Skip to content

feat(markdown-codeblock): add newline prefix - #22369

Merged
raycastbot merged 4 commits into
raycast:mainfrom
kopach:markdown-codeblock-newline
Oct 30, 2025
Merged

raycastbot merged 4 commits into
raycast:mainfrom
kopach:markdown-codeblock-newline

Conversation

@kopach

@kopach kopach commented Oct 23, 2025 •

Copy link
Copy Markdown
Contributor

Description

Simple improvements to markdown-codeblock extension which I use a lot.
Adds possibility to prepend newline before and/or after codeblock (most used case for me)

image

current behavior on master (or prefix disabled at this PR)

2025-10-23 20 16 22

prefix enabled

2025-10-23 20 15 20

Screencast

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: markdown-codeblock Issues related to the markdown-codeblock extension platform: macOS labels Oct 23, 2025
@raycastbot

ghost commented Oct 23, 2025 •

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! 🎉

🔔 @lacherogwu you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

You can expect an initial review within five business days.

@kopach
kopach marked this pull request as ready for review October 23, 2025 18:34

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR adds a preference to prepend a newline before markdown codeblocks, allowing users to insert codeblocks with better formatting when pasting into active applications.

Key Changes:

  • Added isNewLinePrefix checkbox preference (defaults to true)
  • Modified paste logic to conditionally add newline prefix based on preference
  • Updated changelog with new feature entry

Issues Found:

  • Manual Preferences interface should be removed (autogenerated by Raycast)
  • Changelog date should use {PR_MERGE_DATE} placeholder for most recent entry

Confidence Score: 4/5

  • This PR is safe to merge with minor style improvements recommended
  • The implementation is straightforward and functional. Two minor style issues were found that don't affect functionality: manual Preferences interface (should be autogenerated) and hardcoded changelog date (should use placeholder). The core feature works correctly and follows Raycast extension patterns.
  • No files require special attention - issues are minor style improvements only

Important Files Changed

File Analysis

Filename Score Overview
extensions/markdown-codeblock/src/markdown-codeblock.tsx 3/5 Added preference support and Preferences interface for newline prefix feature - violates custom instruction about autogenerated types
extensions/markdown-codeblock/CHANGELOG.md 4/5 Added changelog entry with hardcoded date instead of {PR_MERGE_DATE} placeholder

3 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🚢

@kopach

ghost commented Oct 27, 2025

Copy link
Copy Markdown
Contributor Author

@pernielsentikaer, please take a look, it's approved now by the extension author so can be merged.
Btw, not sure why auto-label task is failing ¯_(ツ)_/¯, let me know if action from me is required

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit 8fd412b into raycast:main Oct 30, 2025
@github-actions

ghost commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Oct 30, 2025

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@kopach
kopach deleted the markdown-codeblock-newline branch October 31, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: markdown-codeblock Issues related to the markdown-codeblock extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants