Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/DocCHTML/MarkdownRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ private extension CharacterSet {
.union(CharacterSet(charactersIn: "`")) // Also consider back-ticks as punctuation. They are used as quotes around symbols or other code.
.subtracting(CharacterSet(charactersIn: "-")) // Don't remove hyphens. They are used as a whitespace replacement.
static let whitespaceAndDashes = CharacterSet.whitespaces
.union(CharacterSet(charactersIn: "-–—")) // hyphen, en dash, em dash
.union(CharacterSet(charactersIn: "-\u{2013}\u{2014}")) // hyphen, en dash, em dash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better thank you. Previously it was impossible to tell what was going on here.

}

/// Creates a more readable version of a fragment by replacing characters that are not allowed in the fragment of a URL with hyphens.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ private func linkName(filename: some StringProtocol) -> String {
}

private let whitespaceAndDashes = CharacterSet.whitespaces
.union(CharacterSet(charactersIn: "-–—")) // hyphen, en dash, em dash
.union(CharacterSet(charactersIn: "-\u{2013}\u{2014}")) // hyphen, en dash, em dash

private extension PathHierarchy.Node {
func matches(languagesFilter: SmallSourceLanguageSet) -> Bool {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftDocC/Model/Identifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ private extension CharacterSet {
.union(CharacterSet(charactersIn: "`")) // Also consider back-ticks as punctuation. They are used as quotes around symbols or other code.
.subtracting(CharacterSet(charactersIn: "-")) // Don't remove hyphens. They are used as a whitespace replacement.
static let whitespaceAndDashes = CharacterSet.whitespaces
.union(CharacterSet(charactersIn: "-–—")) // hyphen, en dash, em dash
.union(CharacterSet(charactersIn: "-\u{2013}\u{2014}")) // hyphen, en dash, em dash
}

/// Creates a more readable version of a fragment by replacing characters that are not allowed in the fragment of a URL with hyphens.
Expand Down