Skip to content

Commit

Permalink
Regex tweak to fix the Update Languages scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
tonisevener committed Jun 14, 2023
1 parent 11e4eff commit a2f9756
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class WikipediaLanguageCommandLineUtilityAPI {
}.eraseToAnyPublisher()
}

private let jsonExtractionRegex = try! NSRegularExpression(pattern: #"(?:mw\.config\.set\()(.*?)(?:\);\n*\}\);)"#, options: [.dotMatchesLineSeparators])
private let jsonExtractionRegex = try! NSRegularExpression(pattern: #"(?:mw\.config\.set\()(.*?)(?:\)\n*;\n*\}\);)"#, options: [.dotMatchesLineSeparators])

private func extractJSONString(from responseString: String) -> String? {
let results = jsonExtractionRegex.matches(in: responseString, range: NSRange(responseString.startIndex..., in: responseString))
Expand Down

0 comments on commit a2f9756

Please sign in to comment.