Skip to content

Commit

Permalink
Fix string count issue (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-lpmg committed Feb 13, 2019
1 parent 73dcf65 commit dc4c969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Tagging/Tagging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ open class Tagging: UIView {
let tag = tagFormat(tagText)
let replace = tag.appending(" ")
let changed = (allText as NSString).replacingCharacters(in: range, with: replace)
let tagRange = NSMakeRange(range.location, tag.count)
let tagRange = NSMakeRange(range.location, tag.utf16.count)

taggedList.append(TaggingModel(text: tagText, range: tagRange))
for i in 0..<taggedList.count-1 {
Expand Down

0 comments on commit dc4c969

Please sign in to comment.