We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class func foo()
Describe the issue
In Swift
works like
static func foo()
But highlight.js interpret func as the class name in this case. Both class and func should be interpreted as keywords.
func
class
For example,
class func foo() async throws -> [Bar]
becomes
<span class="hljs-keyword">class</span> <span class="hljs-title class_">func</span> foo() <span class="hljs-keyword">async</span> <span class="hljs-keyword">throws</span> -> [ <span class="hljs-type">Bar</span>
Whereas,
static func foo() async throws -> [Bar]
<span class="hljs-keyword">static</span> <span class="hljs-keyword">func</span> <span class="hljs-title function_">foo</span> () <span class="hljs-keyword">async</span> <span class="hljs-keyword">throws</span> -> [ <span class="hljs-type">Bar</span>
Which language seems to have the issue?
Swift, manually selected and tested on highlight.js demo page
Are you using highlight or highlightAuto?
highlight
highlightAuto
I believe when the language is set to Swift on the demo page it uses highlight.
Swift
Sample Code to Reproduce
Expected behavior
<span class="hljs-keyword">class</span> <span class="hljs-keyword">func</span> <span class="hljs-title function_">foo</span> () <span class="hljs-keyword">async</span> <span class="hljs-keyword">throws</span> -> [ <span class="hljs-type">Bar</span>
Additional context
swift-docc-render uses a customized function to resolve this issue. See here
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the issue
In Swift
works like
But highlight.js interpret
func
as the class name in this case. Bothclass
andfunc
should be interpreted as keywords.For example,
becomes
Whereas,
becomes
Which language seems to have the issue?
Swift, manually selected and tested on highlight.js demo page
Are you using
highlight
orhighlightAuto
?I believe when the language is set to
Swift
on the demo page it useshighlight
.Sample Code to Reproduce
Expected behavior
Additional context
swift-docc-render uses a customized function to resolve this issue. See here
The text was updated successfully, but these errors were encountered: