Skip to content

Some punctuation causes incorrect wrapping when followed by quote. #33236

Closed

Description

@andiPossess
  • VSCode Version: Code 1.15.1 (41abd21, 2017-08-16T18:05:38.342Z)
  • OS Version: Windows_NT ia32 10.0.14393

Steps to Reproduce:

  1. Create or open a file of any type compatible with VS Code that uses text, preferably .md or .txt but other file types work.
  2. Insert text mixed with white space to ensure proper wrapping behavior.
  3. At the end of the line, for the last character before wrapping would occur, insert a comma (,), a question mark (?), or an ampersand (&).
  4. Follow that character with one of the above listed characters or with a double quotation mark (") or single quotation mark (') or a space ( ) with no other characters between.

Expected result: The entire chunk of punctuation wraps as though it were a single word.
Actual Result: The second punctuation mark wraps as though the previous mark was whitespace.

wrapping

This is particularly annoying when writing dialogue using markdown, as it causes the quotation mark to wrap and look odd.

Activity

  1. added
    editor-core
    on Aug 28, 2017
  2. added
    feature-request
    and removed
    editor-core
    on Nov 27, 2017
  3. alexdevero commented on Apr 16, 2018

    @alexdevero

    This issue might be related. Punctuation sometimes causes wrong syntax rendering, or coloring. For example, dot (.) can cause that text in italic is rendered as plain text.

    With dot (.):
    md-bad

    Without dot (.):
    md-good

  4. alexdima commented on Apr 16, 2018

    @alexdima
    Member

    Alex Devero (@alexdevero) the problem you are describing is not related to wrapping. It might be a problem with the tokenizer for markdown. i.e. I can reproduce when word wrapping is off:
    image

    Please create a separate issue

  5. alexdima commented on Jan 10, 2020

    @alexdima
    Member

    Here is a copy-paste friendly version of the text:

    "What in the world is going on? This is great,"
    
    -------------------------------------------- ,"
    
    -------------------------------------------- ."
    
    -------------------------------------------- +"
    
    -------------------------------------------- &"
    
    -------------------------------------------- !"
    
    -------------------------------------------- ?"
    
    -------------------------------------------- /"
    
    -------------------------------------------- -"
    

    And settings:

    "[plaintext]": {
        "editor.fontLigatures": false,
        "editor.wordWrap": "wordWrapColumn",
        "editor.wordWrapColumn": 46,
        "editor.rulers": [46]
    }

    And the current result:

  6. alexdima commented on Nov 16, 2020

    @alexdima
    Member

    This has been fixed in the meantime:

    image

  7. locked and limited conversation to collaborators on Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    editor-wrappingfeature-request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions