Skip to content

Commit

Permalink
Fix formatting scripts (#6048)
Browse files Browse the repository at this point in the history
Added missing escape characters.
  • Loading branch information
tjzel authored May 27, 2024
1 parent 86b163d commit 49e6924
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions Common/cpp/Fabric/ShadowTreeCloner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ ShadowNode::Unshared cloneShadowTreeWithNewProps(
const auto props = source->getComponentDescriptor().cloneProps(
propsParserContext, source->getProps(), std::move(rawProps));

auto newChildNode = source->clone({/* .props = */ props, ShadowNodeFragment::childrenPlaceholder(), source->getState()});
auto newChildNode = source->clone(
{/* .props = */ props,
ShadowNodeFragment::childrenPlaceholder(),
source->getState()});

for (auto it = ancestors.rbegin(); it != ancestors.rend(); ++it) {
auto &parentNode = it->first.get();
Expand All @@ -50,11 +53,10 @@ ShadowNode::Unshared cloneShadowTreeWithNewProps(

children[childIndex] = newChildNode;

newChildNode = parentNode.clone({
ShadowNodeFragment::propsPlaceholder(),
std::make_shared<ShadowNode::ListOfShared>(children),
parentNode.getState()
});
newChildNode = parentNode.clone(
{ShadowNodeFragment::propsPlaceholder(),
std::make_shared<ShadowNode::ListOfShared>(children),
parentNode.getState()});
}

return std::const_pointer_cast<ShadowNode>(newChildNode);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"format:plugin": "cd plugin && yarn format && cd ..",
"format:java": "node ./scripts/format-java.js",
"format:ios": "find apple/ -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.mm\" -o -iname \"*.cpp\" | xargs clang-format -i --Werror",
"format:android": "find android/src/ -iname *.h -o -iname *.cpp | xargs clang-format -i",
"format:common": "find Common/ -iname *.h -o -iname *.cpp | xargs clang-format -i",
"format:android": "find android/src/ -iname \"*.h\" -o -iname \"*.cpp\" | xargs clang-format -i",
"format:common": "find Common/ -iname \"*.h\" -o -iname \"*.cpp\" | xargs clang-format -i",
"format:docs": "cd docs && yarn format && cd ..",
"find-unused-code:js": "yarn ts-prune --ignore \"index|.web.\" --error ",
"type:check:src": "yarn tsc --noEmit",
Expand Down

0 comments on commit 49e6924

Please # to comment.