A fast, lightweight and flexible Swift syntax highlighter for blogs, tools and fun!
This version of Splash includes support for highlighting code written using Swift 5.5's new concurrency features, including async/await
and actor
types. It also upgrades the Swift version that Slash uses to 5.4
.
Syntax highlighting has also been corrected in the following situations:
nil
is used within a ternary operation.This release also includes documentation fixes by @Yaacoub and @haikusw, and an infrastructure improvement by @fjcaetano.
This release fixes syntax highlighting within the following scenarios:
init
and didSet
are no longer highlighted as method calls in certain situations.try
keyword is now correctly highlighted when used within a function call.some
are now correctly highlighted.Grammar
when using MarkdownDecorator
(by @marcocapano).This releases makes Splash compatible with the Swift 5.2 compiler that's bundled with the current Xcode 11.4 beta, thanks to @duemunk.
unowned
keyword./**/
), by @duemunk.This release also contains a test improvement by @artrmz.
prefix
keyword is now correctly highlighted.New features:
MarkdownDecorator
to highlight all code blocks within a Markdown file.Fixes:
nil
is now properly highlighted when passed to a parameter-less function.#warning
and #error
compiler directives.New APIs
Grammar
now has a method called isDelimiter(mergableWith:)
, which is optional to adopt, and allows each grammar to tweak whether two delimiters should be merged into a single token when evaluated.Fixes
convenience
keyword is now supported.MarkdownDecorator
no longer hard-codes line breaks within the HTML code blocks that it generates (which is also true for the splashmarkdown
command line tool, since it uses that same decoration code).dotAccess
when there are no associated values or parameters passed. So .someCase
will be highlighted as dotAccess
, while .someCall()
won't. This is to make static APIs called using dot access highlighted in a more accurate way.