From beb092d8985648dca8d3a104cbde4eed57b068b1 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 3 May 2016 13:06:39 +0200 Subject: [PATCH] fixed some regex not working on osx. Regex Word boundary "\b" not working on OSX, relaced with Start "\<" and End of Word "\>". --- swift.nanorc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/swift.nanorc b/swift.nanorc index d71207b..d0960f9 100644 --- a/swift.nanorc +++ b/swift.nanorc @@ -12,27 +12,27 @@ color yellow "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&" color brightyellow "[!]" # Statements -color magenta "\b(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\b" -color magenta "\b(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\b" +color magenta "\<(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\>" +color magenta "\<(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\>" # Keywords -color cyan "\b(print)\b" -color magenta "\b(init)\b" +color cyan "\<(print)\>" +color magenta "\<(init)\>" # Numbers -color blue "\b([0-9]+)\b" +color blue "\<([0-9]+)\>" # Standard Types -color brightmagenta "\b((U)?Int(8|16|32|64))\b" -color brightmagenta "\b(true|false|nil)\b" -color brightmagenta "\b(Double|String|Float|Bool|Dictionary|Array|Int|UInt|Character|Range|Set|UnicodeScalar|Bit|RawByte|Slice|UnsafePointer|UnsafeMutablePointer)\b" -color magenta "\b(AnyObject)\b" +color brightmagenta "\<((U)?Int(8|16|32|64))\>" +color brightmagenta "\<(true|false|nil)\>" +color brightmagenta "\<(Double|String|Float|Bool|Dictionary|Array|Int|UInt|Character|Range|Set|UnicodeScalar|Bit|RawByte|Slice|UnsafePointer|UnsafeMutablePointer)\>" +color magenta "\<(AnyObject)\>" # Standard Type Aliases and Protocols -color magenta "\b(AnyObject|AnyClass|GeneratorType|AnyGenerator|Element|Optional|Mirror|UnicodeScalarType|IntMax|UIntMax|Void|Any|Comparable|Equatable|Hashable|SequenceType)\b" +color magenta "\<(AnyObject|AnyClass|GeneratorType|AnyGenerator|Element|Optional|Mirror|UnicodeScalarType|IntMax|UIntMax|Void|Any|Comparable|Equatable|Hashable|SequenceType)\>" # Standard Libraries -color cyan "\b(Foundation|Glibc|Darwin|XCTest)\b" +color cyan "\<(Foundation|Glibc|Darwin|XCTest)\>" # Text color red ""[^"]*""