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:
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:
Steps to reproduce:
Variations tested
/// > "Term" means:/// > 'Term' means:/// > "Term" means:(curly quotes)/// > Term means:(no quotes)/// > \"Term\" means:(escaped)/// > \Term` means:` (backticks)/// > "Term" means(no colon)The crash occurs when ANY quote character (
",',",") is combined with a trailing colon (:) in a blockquote.Environment
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: