@@ -2064,6 +2064,47 @@ let expected = """
2064
2064
XCTAssertEqual ( unmatchedSidecarDiagnostic. severity, . warning)
2065
2065
}
2066
2066
2067
+ func testExtendingSymbolWithSpaceInName( ) throws {
2068
+ let exampleDocumentation = Folder ( name: " unit-test.docc " , content: [
2069
+ JSONFile ( name: " ModuleName.symbols.json " , content: makeSymbolGraph (
2070
+ moduleName: " ModuleName " ,
2071
+ symbols: [
2072
+ SymbolGraph . Symbol (
2073
+ identifier: . init( precise: " symbol-id " , interfaceLanguage: " swift " ) ,
2074
+ names: . init( title: " Symbol Name " , navigator: nil , subHeading: nil , prose: nil ) ,
2075
+ pathComponents: [ " Symbol Name " ] ,
2076
+ docComment: nil ,
2077
+ accessLevel: . public,
2078
+ kind: . init( parsedIdentifier: . class, displayName: " Kind Display Name " ) ,
2079
+ mixins: [ : ]
2080
+ )
2081
+ ]
2082
+ ) ) ,
2083
+
2084
+ TextFile ( name: " Extension.md " , utf8Content: """
2085
+ # ``Symbol Name``
2086
+
2087
+ Extend a symbol with a space in its name.
2088
+ """ ) ,
2089
+
2090
+ TextFile ( name: " Article.md " , utf8Content: """
2091
+ # Article
2092
+
2093
+ Link in content to a symbol with a space in its name: ``Symbol Name``.
2094
+ """ ) ,
2095
+ ] )
2096
+
2097
+ let tempURL = try createTempFolder ( content: [ exampleDocumentation] )
2098
+ let ( _, bundle, context) = try loadBundle ( from: tempURL)
2099
+
2100
+ XCTAssert ( context. problems. isEmpty, " Unexpected problems: \( context. problems. map ( \. diagnostic. summary) . joined ( separator: " \n " ) ) " )
2101
+
2102
+ let reference = ResolvedTopicReference ( bundleIdentifier: bundle. identifier, path: " /documentation/ModuleName/Symbol_Name " , sourceLanguage: . swift)
2103
+ let node = try context. entity ( with: reference)
2104
+
2105
+ XCTAssertEqual ( ( node. semantic as? Symbol ) ? . abstract? . plainText, " Extend a symbol with a space in its name. " )
2106
+ }
2107
+
2067
2108
func testDeprecationSummaryWithLocalLink( ) throws {
2068
2109
let exampleDocumentation = Folder ( name: " unit-test.docc " , content: [
2069
2110
JSONFile ( name: " ModuleName.symbols.json " , content: makeSymbolGraph (
0 commit comments