Skip to content

Releases

Swift-Highlight 1.1.0

Choose a tag to compare

@ThorFuchs ThorFuchs released this 18 Nov 10:05
50b0dcf

Swift-Highlight 1.1.0

This minor release adds configurable code cards and a command-line exporter.
Existing core, HTML, and Apple rendering APIs remain available.

  • SwiftHighlightCodeCard produces escaped HTML cards with scoped styles,
    GitHub light and dark themes, and configurable titles, wrapping and layout.
  • SwiftHighlightSwiftUI provides a native card view using built-in or custom
    Apple highlight themes. On macOS, it can export the view as PNG.
  • highlight-card reads UTF-8 source from a file or standard input and writes
    HTML on supported platforms or PNG on macOS. PNG export requires wrapping
    and validates image dimensions to avoid hiding code outside the viewport.
  • Ten original language examples and a reproducible image gallery show actual
    highlighting output. DocC catalogs cover all five library products.

Swift-Highlight requires Swift 6.1 or later. To use this release:

.package(url: "https://github.com/ThorFuchs/Swift-Highlight.git", from: "1.1.0")

The README
includes SwiftUI and command-line examples. Swift Package Index documentation
is configured for all five library products; hosting depends on the index
accepting and processing the package.

The engine does not enforce hard time or input-size limits. WASI coverage is a
representative consumer smoke test; simulator builds are not device runtime
tests. Linux sanitizer checks cover targeted paths and do not prove blanket
race freedom. See the implementation report
for verification scope and remaining limitations.

Examples replaced in 1.0.1 remain in the published 1.0.0 tag and imported Git
history. Their replacement does not establish additional rights in historical
copies. See the third-party notices
and fixture provenance.

Swift-Highlight 1.0.2

Choose a tag to compare

@ThorFuchs ThorFuchs released this 18 Nov 07:21
42e20df

Swift-Highlight 1.0.2

This documentation-focused patch expands the inline API reference and adds
guides for getting started, tokens and diagnostics, language detection,
incremental highlighting, custom grammars, concurrency and limits, safe HTML,
and Apple themes. Executable documentation examples are checked in CI.

The package includes DocC catalogs and Swift Package Index documentation
configuration for all three library products: SwiftHighlight,
SwiftHighlightHTML, and SwiftHighlightApple. Indexing and hosted
documentation depend on the Swift Package Index processing the package.

Swift-Highlight requires Swift 6.1 or later. To use this release:

.package(url: "https://github.com/ThorFuchs/Swift-Highlight.git", from: "1.0.2")

The engine does not enforce hard time or input-size limits. WASI coverage is a
representative smoke test, and an iOS Simulator build is not a device runtime
test. See the implementation report
for verification scope and remaining limitations.

The original examples replaced in 1.0.1 remain in the published 1.0.0 tag and
imported Git history. Their replacement does not establish additional rights
in historical copies. See the third-party notices
and fixture provenance.

Swift-Highlight 1.0.1

Choose a tag to compare

@ThorFuchs ThorFuchs released this 17 Nov 16:46
71d23c5

Swift-Highlight 1.0.1

This patch release replaces identified third-party quotations and a named
example in three test fixtures with neutral text. The syntax cases remain
covered, and all 375 fixture pairs have been checked against the pinned
highlight.js reference.

The Linux language registry now uses NSLock-protected state so targeted
contended compilation paths can be checked under Thread Sanitizer. The new
Linux CI checks both successful and failed compilation paths repeatedly with
Swift 6.2.4 and 6.4. The independent Synchronization.Mutex control can
still report warnings; the package tests and NSLock control must pass. These
checks do not establish blanket race freedom.

A paired Linux release benchmark found that warm highlighting and
warm auto-detection were approximately unchanged in the measured workloads;
warm contention was slower by 7.7% with eight tasks and 5.9% with 32 tasks.
See the benchmark record
for intervals, raw samples and limitations.

The original examples remain in the published 1.0.0 tag and imported Git
history. The replacement does not constitute a legal review or establish
additional rights in those historical copies. See the
third-party notices
and fixture provenance.

Swift-Highlight requires Swift 6.1 or later. To use this release:

.package(url: "https://github.com/ThorFuchs/Swift-Highlight.git", from: "1.0.1")

The engine does not enforce hard time or input-size limits. WASI coverage is a
representative smoke test, and an iOS Simulator build is not a device runtime
test. See the implementation report
for the scope of verification and remaining limitations.

Swift-Highlight 1.0.0

Choose a tag to compare

@ThorFuchs ThorFuchs released this 17 Nov 12:05

Swift-Highlight 1.0.0

Swift-Highlight is a native Swift syntax-highlighting package with separate
libraries for analysis, HTML, and Apple attributed text. Its core produces
UTF-16 token ranges and scopes for 65 registered languages. The strict API
reports language, grammar, and engine failures; the HTML renderer escapes code
and validates scope and language class names. Apple themes can be applied to
an existing result without repeating analysis.

The package requires Swift 6.1 or later. Add it to a Swift package using:

.package(url: "https://github.com/ThorFuchs/Swift-Highlight.git", from: "1.0.0")

The project retains the history of HighlightKit at commit
524c185b0553756498c1b6a1765e8d119c4623a6 and uses fixture expectations from
highlight.js 11.11.1 at 08cb242e7d4aee787114eb04cc7ab18314d82f92. The test
suite checks 375 fixture pairs; this is not a claim of universal highlight.js
or GitHub.com parity. See the third-party notices.

Linux x86_64 builds and tests have passed on Swift 6.1.3, 6.2.4 and 6.4.2.
Core and HTML have passed WASI Preview 1 builds and one runtime smoke test.
The CI run for the tagged commit 326a008
passed its Linux, documentation, and macOS jobs. The macOS job includes tests,
a release build, a generic iOS Simulator build, and DocC for all three archives.
An earlier macOS DocC run at cb3fb8c documented 215/215 Core, 8/8 HTML,
and 87/87 Apple public source symbols.

Known limitations

  • The engine uses regular expressions and enforces no hard time or input-size
    limit. Callers handling untrusted input must provide their own resource controls.
  • Linux Thread Sanitizer reported warnings in a contended compilation test and
    also in an independent Swift Mutex control. The package warnings have not
    been conclusively classified; see the
    implementation report.
  • WASI coverage is a representative smoke test; an iOS Simulator build is not
    a device runtime test.