diff --git a/ReactCommon/fabric/attributedstring/conversions.h b/ReactCommon/fabric/attributedstring/conversions.h index 66e4bbc41..fd531cef4 100644 --- a/ReactCommon/fabric/attributedstring/conversions.h +++ b/ReactCommon/fabric/attributedstring/conversions.h @@ -487,6 +487,8 @@ inline folly::dynamic toDynamic(const AttributedString &attributedString) { fragments.push_back(dynamicFragment); } value("fragments", fragments); + value( + "hash", std::hash{}(attributedString)); value("string", attributedString.getString()); return value; } diff --git a/ReactCommon/fabric/components/text/paragraph/conversions.h b/ReactCommon/fabric/components/text/paragraph/conversions.h index bf2f2e1eb..996251c19 100644 --- a/ReactCommon/fabric/components/text/paragraph/conversions.h +++ b/ReactCommon/fabric/components/text/paragraph/conversions.h @@ -14,6 +14,7 @@ inline folly::dynamic toDynamic(const ParagraphLocalData ¶graphLocalData) { folly::dynamic newLocalData = folly::dynamic::object(); newLocalData["attributedString"] = toDynamic(paragraphLocalData.getAttributedString()); + newLocalData["hash"] = newLocalData["attributedString"]["hash"]; return newLocalData; }