1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-22 00:25:39 +01:00

fixed some regex not working on osx.

Regex Word boundary "\b" not working on OSX, relaced with Start "\<" and End of Word "\>".
This commit is contained in:
Philipp 2016-05-03 13:06:39 +02:00
parent 2358b0f7c2
commit beb092d898

View File

@ -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 ""[^"]*""