File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ module ScopeSlug =
175
175
| Def.LinkDef _ -> None
176
176
| Def.Doc -> Some( ofDocId docId)
177
177
| Def.Header( 1 , id) -> Some( ScopeSlug( Slug.ofString id))
178
- | Def.Header _ -> None
178
+ | Def.Header _ -> Some ( ofDocId docId )
179
179
180
180
let ofScopedDef ( scope : Scope , def : Def ) =
181
181
match Scope.asDoc scope with
Original file line number Diff line number Diff line change @@ -191,6 +191,23 @@ module ConnGraphTests =
191
191
let connDiff = Conn.difference fromScratch incr
192
192
checkInlineSnapshot id [ connDiff.CompactFormat() ] [ " " ]
193
193
194
+ [<Fact>]
195
+ let addTitle_CrossSection () =
196
+ let d1 =
197
+ FakeDoc.Mk( path = " d1.md" , contentLines = [| " # D1" ; " [[d2#sub]]" |])
198
+
199
+ let d2 = FakeDoc.Mk( path = " d2.md" , contentLines = [| " # D2" ; " ## Sub" |])
200
+
201
+ let d1Upd =
202
+ FakeDoc.Mk( path = " d1.md" , contentLines = [| " # D2" ; " [[d2#sub]]" |])
203
+
204
+ let incr = mkFolder [ d1; d2 ] |> Folder.withDoc d1Upd |> Folder.conn
205
+
206
+ let fromScratch = mkFolder [ d1Upd; d2 ] |> Folder.conn
207
+
208
+ let connDiff = Conn.difference fromScratch incr
209
+ checkInlineSnapshot id [ connDiff.CompactFormat() ] [ " " ]
210
+
194
211
[<Fact>]
195
212
let fixRef () =
196
213
let d1 =
You can’t perform that action at this time.
0 commit comments