We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cc2c34d + 0292487 commit 100ffacCopy full SHA for 100ffac
Aztec/Classes/Extensions/String+EndOfLine.swift
@@ -21,8 +21,9 @@ extension String {
21
/// - Returns: `true` if the specified offset is in an empty paragraph, `false` otherwise.
22
///
23
func isEmptyParagraph(at offset: Int) -> Bool {
24
-
25
- let index = self.index(startIndex, offsetBy: offset)
+ guard let index = self.indexFromLocation(offset) else {
+ return true
26
+ }
27
28
return isEmptyParagraph(at: index)
29
}
0 commit comments