Skip to content

Commit

Permalink
feat: Add support for Xcode 9.1 (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcwatson authored and kylef committed Nov 17, 2017
1 parent a52ee21 commit 9e24ab6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ matrix:
- os: osx
osx_image: xcode9
env: SWIFT_VERSION=4.0
- os: osx
osx_image: xcode9.1
env: SWIFT_VERSION=4.0
- os: linux
env: SWIFT_VERSION=3.1.1
- os: linux
Expand Down
4 changes: 2 additions & 2 deletions Sources/Lexer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct Lexer {
guard string.characters.count > 4 else { return "" }
let start = string.index(string.startIndex, offsetBy: 2)
let end = string.index(string.endIndex, offsetBy: -2)
return string[start..<end].trim(character: " ")
return String(string[start..<end]).trim(character: " ")
}

if string.hasPrefix("{{") {
Expand Down Expand Up @@ -149,6 +149,6 @@ extension String {
func trim(character: Character) -> String {
let first = findFirstNot(character: character) ?? startIndex
let last = findLastNot(character: character) ?? endIndex
return self[first..<last]
return String(self[first..<last])
}
}

0 comments on commit 9e24ab6

Please sign in to comment.