From 09857bf11e74319a1904a522cc2f43f7e96690dc Mon Sep 17 00:00:00 2001 From: Yevhenii Voloshchak Date: Mon, 16 May 2022 17:37:41 +0300 Subject: [PATCH 1/3] Do not disable whitespace collapsing --- src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js b/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js index a7e4c910f938..874a7364d084 100755 --- a/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js +++ b/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js @@ -53,7 +53,6 @@ const BaseHTMLEngineProvider = (props) => { baseStyle={styles.webViewStyles.baseFontStyle} tagsStyles={styles.webViewStyles.tagStyles} enableCSSInlineProcessing={false} - dangerouslyDisableWhitespaceCollapsing systemFonts={_.values(fontFamily)} > Date: Mon, 16 May 2022 17:39:24 +0300 Subject: [PATCH 2/3] Add styles to baseFontStyle --- src/styles/styles.js | 1 + src/styles/utilities/whiteSpace/index.js | 3 +++ src/styles/utilities/whiteSpace/index.native.js | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/styles/styles.js b/src/styles/styles.js index f222d4f56246..8a25f765ea36 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -131,6 +131,7 @@ const webViewStyles = { }, baseFontStyle: { + ...whiteSpace.pre, color: themeColors.text, fontSize: variables.fontSizeNormal, fontFamily: fontFamily.GTA, diff --git a/src/styles/utilities/whiteSpace/index.js b/src/styles/utilities/whiteSpace/index.js index 7a7ac524d2cc..a7051cda6c21 100644 --- a/src/styles/utilities/whiteSpace/index.js +++ b/src/styles/utilities/whiteSpace/index.js @@ -5,4 +5,7 @@ export default { preWrap: { whiteSpace: 'pre-wrap', }, + pre: { + whiteSpace: 'pre', + }, }; diff --git a/src/styles/utilities/whiteSpace/index.native.js b/src/styles/utilities/whiteSpace/index.native.js index 250ded17052a..d807b47f208a 100644 --- a/src/styles/utilities/whiteSpace/index.native.js +++ b/src/styles/utilities/whiteSpace/index.native.js @@ -1,4 +1,7 @@ export default { noWrap: {}, preWrap: {}, + pre: { + whiteSpace: 'pre', + }, }; From e3337c04cf803dd1007fc8d7ac9003b3ac995d44 Mon Sep 17 00:00:00 2001 From: Yevhenii Voloshchak Date: Mon, 16 May 2022 18:58:39 +0300 Subject: [PATCH 3/3] Update baseFontStyle --- src/styles/styles.js | 2 +- src/styles/utilities/whiteSpace/index.js | 3 --- src/styles/utilities/whiteSpace/index.native.js | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index 8a25f765ea36..9f35e60fb728 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -131,11 +131,11 @@ const webViewStyles = { }, baseFontStyle: { - ...whiteSpace.pre, color: themeColors.text, fontSize: variables.fontSizeNormal, fontFamily: fontFamily.GTA, flex: 1, + whiteSpace: 'pre', }, }; diff --git a/src/styles/utilities/whiteSpace/index.js b/src/styles/utilities/whiteSpace/index.js index a7051cda6c21..7a7ac524d2cc 100644 --- a/src/styles/utilities/whiteSpace/index.js +++ b/src/styles/utilities/whiteSpace/index.js @@ -5,7 +5,4 @@ export default { preWrap: { whiteSpace: 'pre-wrap', }, - pre: { - whiteSpace: 'pre', - }, }; diff --git a/src/styles/utilities/whiteSpace/index.native.js b/src/styles/utilities/whiteSpace/index.native.js index d807b47f208a..250ded17052a 100644 --- a/src/styles/utilities/whiteSpace/index.native.js +++ b/src/styles/utilities/whiteSpace/index.native.js @@ -1,7 +1,4 @@ export default { noWrap: {}, preWrap: {}, - pre: { - whiteSpace: 'pre', - }, };