Skip to content

Commit

Permalink
Merge pull request #2127 from wordpress-mobile/issue/1966_white_space…
Browse files Browse the repository at this point in the history
…_removal

Issue/1966 Disable whitespace collapse in Aztec
  • Loading branch information
SergioEstevao authored Apr 24, 2020
2 parents 71cbc74 + f36064c commit 35ca316
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
------
* Prefill caption for image blocks when available on the Media library
* New block: Buttons. From now you’ll be able to add the individual Button block only inside the Buttons block
* [iOS]: Video in video blocks can now be played inline on the editor.
* Fix bug where whitespaces at start of text blocks were being removed
* Add support for upload options in Cover block
* [Android] Floating toolbar, previously located above nested blocks, is now placed at the top of the screen
* [iOS] Floating toolbar, previously located above nested blocks, is now placed at the bottom of the screen
Expand Down
2 changes: 1 addition & 1 deletion RNTAztecView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Pod::Spec.new do |s|
s.xcconfig = {'OTHER_LDFLAGS' => '-lxml2',
'HEADER_SEARCH_PATHS' => '/usr/include/libxml2'}
s.dependency 'React-Core'
s.dependency 'WordPress-Aztec-iOS', '~> 1.17.1'
s.dependency 'WordPress-Aztec-iOS', '~> 1.18.0'

end
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ target 'gutenberg' do
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNTAztecView', :path => '../RNTAztecView.podspec'
#Use for testing non official versions of Aztec
#pod 'WordPress-Aztec-iOS', :git => 'https://github.com/wordpress-mobile/WordPress-Aztec-iOS.git', :commit => 'edf1c9ae758b946e76bb9de6efc9135d2c2a4b43'
#pod 'WordPress-Aztec-iOS', :git => 'https://github.com/wordpress-mobile/WordPress-Aztec-iOS.git', :commit => '29dff741f4b19435d75f21179e27766337de8e9d'
pod 'Gutenberg', :path => '../Gutenberg.podspec'

target 'gutenbergTests' do
Expand Down
10 changes: 5 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ PODS:
- React
- RNTAztecView (1.26.0):
- React-Core
- WordPress-Aztec-iOS (~> 1.17.1)
- WordPress-Aztec-iOS (1.17.1)
- WordPress-Aztec-iOS (~> 1.18.0)
- WordPress-Aztec-iOS (1.18.0)
- Yoga (1.14.0)

DEPENDENCIES:
Expand Down Expand Up @@ -393,10 +393,10 @@ SPEC CHECKSUMS:
ReactCommon: 198c7c8d3591f975e5431bec1b0b3b581aa1c5dd
ReactNativeDarkMode: f61376360c5d983907e5c316e8e1c853a8c2f348
RNSVG: 68a534a5db06dcbdaebfd5079349191598caef7b
RNTAztecView: 65e1984620590339bb1bcced6f5e914cba8df2f5
WordPress-Aztec-iOS: 319620514af963ca519bd83b96a2c0ebdf3a0f03
RNTAztecView: db66aa89626b70a40c25f7bd06e7d7588fdf85db
WordPress-Aztec-iOS: fae5d158879dfd6f36c8d0ff0cc111a0b8e36790
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b

PODFILE CHECKSUM: 7c7e4c82bf2c9ed08e515c352b72fc2d70b4ba48
PODFILE CHECKSUM: 8fc85c086e46c9bb555a0c4ebda2e57ceae0a8d6

COCOAPODS: 1.8.4
2 changes: 1 addition & 1 deletion react-native-aztec/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
wordpressUtilsVersion = '1.22'
espressoVersion = '3.0.1'

aztecVersion = 'v1.3.40'
aztecVersion = 'v1.3.41'
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ public boolean shouldSkipTidying() {
return isPreTag();
}

@Override
public boolean shouldIgnoreWhitespace() {
return false;
}

// VisibleForTesting from {@link TextInputEventsTestCase}.
public void requestFocusFromJS() {
mIsJSSettingFocus = true;
Expand Down
1 change: 1 addition & 0 deletions react-native-aztec/ios/RNTAztecView/RCTAztecView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class RCTAztecView: Aztec.TextView {
addPlaceholder()
textDragInteraction?.isEnabled = false
storage.htmlConverter.characterToReplaceLastEmptyLine = Character(.zeroWidthSpace)
storage.htmlConverter.shouldCollapseSpaces = false
shouldNotifyOfNonUserChanges = false
disableLinkTapRecognizer()
preBackgroundColor = .clear
Expand Down

0 comments on commit 35ca316

Please sign in to comment.