Skip to content

Commit

Permalink
(fix: #215) Update Matched Pairs (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoolwinter authored Feb 5, 2024
1 parent 00bb66f commit 704b76d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ extension TextViewController {
let precedingCharacter = textView.textStorage.substring(
from: NSRange(location: range.location - 1, length: 1) // The preceding character exists
) {
for pair in BracketPairs.allValues {
for pair in BracketPairs.highlightValues {
if precedingCharacter == pair.0 {
// Walk forwards
if let characterIndex = findClosingPair(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ extension TextViewController {
("{", "}"),
("[", "]"),
("(", ")"),
("<", ">")
("\"", "\""),
("'", "'")
]

static let highlightValues: [(String, String)] = [
("{", "}"),
("[", "]"),
("(", ")")
]
}

Expand Down

0 comments on commit 704b76d

Please sign in to comment.