Highlight not working
Closed this issue · 3 comments
yungsem commented
Hi, I have installed your plugin on my vs code, but when I write swift codes, the highlight doesn't work. What should I do? Many thanks.
swarnendubiswas commented
func makeRow(id: Any, rest: [Any]) -> String {
return "\(id)\(rest.reduce( "", { l,r in "\(l),\(r)" }))\n"
}
This kills syntax highlighting.
mgrebenets commented
Here's another example:
static let mainGroupLine = try! NSRegularExpression(pattern: "^\\s+mainGroup = ([0-9A-F]{24});$", options: [])
static let targetsLine = try! NSRegularExpression(pattern: "^(\\s+)targets = \\($", options: [])
static let filesLine = try! NSRegularExpression(pattern: "^(\\s+)files = \\($", options: [])
static let childrenLine = try! NSRegularExpression(pattern: "^(\\s*)children = \\($", options: [])```
Highlight gets broken after 2nd line because of the regex string pattern "^(\\s+)files = \\($"
.
More precisely it seems to get broken on the escape sequence in regex string: \\($
:
kasik96 commented
If you have solution for this, feel free to create Pull Request.