Skip to content

Commit

Permalink
Merge pull request #1440 from PrismJS/fix-solidity-protocol
Browse files Browse the repository at this point in the history
Fix Swift protocol
  • Loading branch information
mAAdhaTTah authored Jun 16, 2018
2 parents 09b56af + 2c6b6a4 commit 5f04f4d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/prism-swift.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Prism.languages.swift = Prism.languages.extend('clike', {
}
}
},
'keyword': /\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|Protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,
'keyword': /\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,
'number': /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,
'constant': /\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,
'atrule': /@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,
'builtin': /\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/
});
Prism.languages.swift['string'].inside['interpolation'].inside.rest = Prism.languages.swift;
Prism.languages.swift['string'].inside['interpolation'].inside.rest = Prism.languages.swift;
2 changes: 1 addition & 1 deletion components/prism-swift.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/languages/swift/keyword_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ postfix
precedence
prefix
private
Protocol
protocol
public
repeat
required
Expand Down Expand Up @@ -126,7 +126,7 @@ __LINE__
["keyword", "precedence"],
["keyword", "prefix"],
["keyword", "private"],
["keyword", "Protocol"],
["keyword", "protocol"],
["keyword", "public"],
["keyword", "repeat"],
["keyword", "required"],
Expand Down Expand Up @@ -162,4 +162,4 @@ __LINE__

----------------------------------------------------

Checks for all keywords.
Checks for all keywords.

0 comments on commit 5f04f4d

Please sign in to comment.