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

repl: backslash bug fix #2952

Closed

Commits on Sep 18, 2015

  1. repl: revert 81ea52a to fix newlines in copy-paste

    When some string is copied and pasted in REPL, if it has a newline (\n)
    in it, then it is considered as end of line and REPL throws a
    SyntaxError, because a line cannot end with a unclosed string literal.
    This behavior is because of the fact that `readline` module breaks at
    all the `\n`s in the input string and treats them as a seperate line.
    So whenever it encounters a new line character it will emit a `line`
    event.
    
    This commit basically reverts
    nodejs@81ea52a,
    which was an attempt to improve the way string literals were handled
    by REPL.
    
    Fixes: nodejs#2749
    thefourtheye committed Sep 18, 2015
    Configuration menu
    Copy the full SHA
    6742c9b View commit details
    Browse the repository at this point in the history
  2. repl: remove buggy trimWhiteSpace function

    As it is, the trimWhitespace function will not remove the white sapce
    characters at the end of the string, as the greedy capturing group .+
    captures everything till end of the string, leaving \s* with nothing.
    
    This patch replaces the buggy function with the built-in, String
    prototype's trim function.
    thefourtheye committed Sep 18, 2015
    Configuration menu
    Copy the full SHA
    efa366b View commit details
    Browse the repository at this point in the history