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

util, test: improve inspect escaping #21624

Closed
wants to merge 4 commits into from

Commits on Jul 2, 2018

  1. util: do not escape single quotes if not necessary

    Right now util.inspect will always escape single quotes. That is not
    necessary though in case the string that will be escaped does not
    contain double quotes. In that case the string can simply be wrapped
    in double quotes instead.
    BridgeAR committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    05ce84a View commit details
    Browse the repository at this point in the history
  2. util: reduce .inspect quote escaping

    This reduces the amount of quotes util.inspect escapes by falling
    back to backticks in case a string contains single and double quotes.
    That makes sure only very few strings have to escape quotes at all.
    Thus it increases the readability of these strings.
    BridgeAR committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    1c80969 View commit details
    Browse the repository at this point in the history
  3. test: improve inspect readability

    The string escaping is hard to read. This changes all those escaped
    strings to use double quotes instead so no escaping is necessary.
    BridgeAR committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    8655234 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2018

  1. fixup: address comment

    BridgeAR committed Jul 4, 2018
    Configuration menu
    Copy the full SHA
    97f78de View commit details
    Browse the repository at this point in the history