Skip to content

Line wrapping of blockquotes not working correctly #3501

@silby

Description

@silby

Describe the bug

$ gh --version
gh version 1.9.2 (2021-04-20)
https://github.com/cli/cli/releases/tag/v1.9.2

When displaying issue comments containing blockquotes, linewrapping of the quoted text is bugs. Long lines (over 72 characters?) have their last word or so printed on the subsequent terminal line, sans the box drawing character used for indentation.

Steps to reproduce the behavior

gh issue view -R cli/cli -c 359, for me the comments from joshriplett on Feb 12 2020 and from me on April 22 2021 exhibit the issue in the blockquotes in those comments.

Expected vs actual behavior

Expected: blockquoted paragraphs wrap attractively.

Actual: long lines take up an 'extra' line in the output.

Logs

Here's an illustration of what I get in my terminal, in case this is not universally reproducible:

silby • 19h • Newest comment


  │ What about the reverse? Quote the entire patch file, and have people
  insert
  │ their comments without the quote marks. That will be familiar for anyone
  │ used to reviewing patches by email, and the  >  prefix on every line
  should
  │ prevent editors from attempting to fiddle with the patch.

  I strongly cosign this suggestion!

System details:

macOS 10.15.7, iTerm2 3.4.5, https://github.com/ibara/oksh 6.8.1, TERM=xterm-256color-italic (which is stock xterm-256color termcap plus sitm=\E[3m, ritm=\E[23m)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions