Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for copying code snippets #1455

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Sep 19, 2024

  1. bugfix: core: Update clipboard_text to account for WSL.

    Adjusted clipboard_text by replacing \r\n with \n to accommodate carriage
    returns in WSL. Ensures consistent newline handling for comparison.
    This prevents unnecessary "text does not match" warnings for WSL users when
    copying texts containing newline characters.
    rsashank committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    cbd1fee View commit details
    Browse the repository at this point in the history
  2. buttons: Add CodeBlockButton class.

    This class inherits from urwid.Button and enables the creation of code
    block buttons that copy code to the clipboard when activated.
    
    Co-authored-by: kingjuno <[email protected]>
    Co-authored-by: yuktasarode <[email protected]>
    3 people committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    9677d19 View commit details
    Browse the repository at this point in the history
  3. messages/views: Add markup to code blocks.

    Updated existing tests. New test added.
    
    Co-authored-by: kingjuno <[email protected]>
    Co-authored-by: yuktasarode <[email protected]>
    3 people committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    1fece13 View commit details
    Browse the repository at this point in the history
  4. core/views: Add support for copying code blocks.

    Introduces support for copying code blocks in the message information
    popup. Makes use of the CodeBlockButton class and its methods.
    Tests added.
    
    Co-authored-by: kingjuno <[email protected]>
    Co-authored-by: yuktasarode <[email protected]>
    
    Fixes zulip#1123.
    rsashank committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    d9cf3b8 View commit details
    Browse the repository at this point in the history