Closed
Description
Description
When rendering Swift compiler documentation the diagnostics formatting code crashes on certain Markdown pages.
Checklist
- If possible, I've reproduced the issue using the
main
branch of this package. - This issue hasn't been addressed in an existing GitHub issue.
Expected Behavior
No crashes.
Actual behavior
Swift/StringCharacterView.swift:158: Fatal error: String index is out of bounds
Steps To Reproduce
- Clone https://github.com/apple/swift.git
- Install a recent development snapshot of Swift, I'm using
swift-DEVELOPMENT-SNAPSHOT-2023-07-23-a
. - Run DocC from this snapshot this way (assuming
swift
is the clone from step 1):
docc preview --allow-arbitrary-catalog-directories swift/docs
Swift-DocC Version Information
swift-DEVELOPMENT-SNAPSHOT-2023-07-23-a
Swift Compiler Version Information
Apple Swift version 5.9-dev (LLVM 9b562f55c38e378, Swift b4ee68bd37c4f7d)
Target: arm64-apple-macosx14.0