Skip to content

Commit 7b6b3a5

Browse files
authored
Merge pull request #68 from leoananth/master
Fixes for regular expression to parse generic tags
2 parents 7f0cb3f + 085c0c1 commit 7b6b3a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftRichString/Style/StyleGroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public class StyleGroup: StyleProtocol {
8686
private func extractParametersFromTags(_ string: String) -> [String: String]? {
8787
guard let _ = string.firstIndex(of: " ") else { return nil } // no tags
8888

89-
let pattern = "\\w*\\s*=\\s*\"?\\s*([\\w\\s%#\\/\\.;:_-]*)\\s*\"?.*?" // maybe shorter?
89+
let pattern = "\\w*\\s*=\\s*\"?\\s*([^\"][^\"]*)\\s*\"?.*?" // maybe shorter?
9090
guard let regex = try? NSRegularExpression(pattern: pattern, options: .dotMatchesLineSeparators) else {
9191
return nil
9292
}

0 commit comments

Comments
 (0)