From f015900d30321bc24ba850118746eb7a68d5d8fd Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Wed, 21 Mar 2018 16:38:41 -0700 Subject: [PATCH] fixed debug string formatting for structure Summary: Fixed minor issue: * use double spaces instead of a tab character for indentation * depth should increase by 1, not 2 Reviewed By: shergin Differential Revision: D7332803 fbshipit-source-id: 74fda2c7a4be4f509270d3074a7d71a3d4d32fe4 --- ReactCommon/fabric/debug/DebugStringConvertible.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReactCommon/fabric/debug/DebugStringConvertible.cpp b/ReactCommon/fabric/debug/DebugStringConvertible.cpp index f669c1bd5..ce2c91611 100644 --- a/ReactCommon/fabric/debug/DebugStringConvertible.cpp +++ b/ReactCommon/fabric/debug/DebugStringConvertible.cpp @@ -50,10 +50,10 @@ std::string DebugStringConvertible::getDebugPropsDescription(DebugStringConverti std::string DebugStringConvertible::getDebugDescription(DebugStringConvertibleOptions options, int depth) const { std::string nameString = getDebugName(); std::string valueString = getDebugValue(); - std::string childrenString = getDebugChildrenDescription(options, depth + 1); - std::string propsString = getDebugPropsDescription(options, depth /* The first-level props are considered as same-depth things. */); + std::string childrenString = getDebugChildrenDescription(options, depth); + std::string propsString = getDebugPropsDescription(options, depth); - std::string leading = options.format ? std::string(depth, '\t') : ""; + std::string leading = options.format ? std::string(depth * 2, ' ') : ""; std::string trailing = options.format ? "\n" : ""; return leading + "<" + nameString +