Skip to content

Commit

Permalink
Fix #34 + many cosmetic improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ameshkov committed Mar 1, 2022
1 parent 8e2d272 commit 6d7f6e5
Show file tree
Hide file tree
Showing 12 changed files with 1,085 additions and 1,005 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ class BlockerEntryFactory {
}

// Safari doesn't support non-ASCII characters in regular expressions
if (!(urlRegExpSource! as String).isASCII()) {
throw ConversionError.unsupportedRegExp(message: "Safari doesn't support non-ASCII characters in regular expressions");
if !urlRegExpSource!.canBeConverted(to: String.Encoding.ascii.rawValue) {
throw ConversionError.unsupportedRegExp(message: "Safari doesn't support non-ASCII characters in regular expressions")
}

// Regex that we generate for basic non-regex rules are okay
Expand Down
178 changes: 92 additions & 86 deletions Sources/ContentBlockerConverter/Compiler/Compiler.swift

Large diffs are not rendered by default.

Loading

0 comments on commit 6d7f6e5

Please sign in to comment.