Skip to content

DocC crashes when blockquote contains quote character and trailing colon #253

@coenttb

Description

@coenttb

Description

DocC crashes (exit code 133) when processing documentation that contains a blockquote with both a quote character and a trailing colon.

Reproduction

Minimal example that crashes:

/// Title /// /// > "Term" means a definition that: public struct Test {}

Steps to reproduce:

mkdir -p /tmp/docc-bug-test/Sources/TestModule/TestModule.docc cat > /tmp/docc-bug-test/Package.swift << 'PKGEOF' // swift-tools-version: 5.9 import PackageDescription let package = Package(  name: "TestModule",  products: [.library(name: "TestModule", targets: ["TestModule"])],  targets: [.target(name: "TestModule")] ) PKGEOF cat > /tmp/docc-bug-test/Sources/TestModule/Test.swift << 'SRCEOF' /// Title /// /// > "Term" means a definition that: public struct Test {} SRCEOF cat > /tmp/docc-bug-test/Sources/TestModule/TestModule.docc/TestModule.md << 'DOCEOF' # ``TestModule`` Test module. DOCEOF cd /tmp/docc-bug-test swift build --target TestModule -Xswiftc -emit-symbol-graph -Xswiftc -emit-symbol-graph-dir -Xswiftc .build/symbol-graph docc convert \ --fallback-display-name "TestModule" \ --fallback-bundle-identifier "TestModule" \ --output-dir /tmp/docc-output \ --additional-symbol-graph-dir .build/symbol-graph \ Sources/TestModule/TestModule.docc # Exit code: 133

Variations tested

Pattern Result
/// > "Term" means: ❌ CRASHES
/// > 'Term' means: ❌ CRASHES
/// > "Term" means: (curly quotes) ❌ CRASHES
/// > Term means: (no quotes) ✅ Works
/// > \"Term\" means: (escaped) ✅ Works
/// > \Term` means:` (backticks) ✅ Works
/// > "Term" means (no colon) ✅ Works

The crash occurs when ANY quote character (", ', ", ") is combined with a trailing colon (:) in a blockquote.

Environment

  • docc from Xcode 26.0 beta (16A5171c) toolchain
  • Also reproduces with Xcode's Build Documentation
  • Swift 6.2
  • macOS 26.0 (Tahoe)

Expected behavior

DocC should process the documentation without crashing, rendering the blockquote with the quote characters and colon as written.

Actual behavior

DocC crashes with exit code 133. No diagnostic messages are produced.

Workaround

Escape the quote characters with backslashes: /// > \"Term\" means:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions